Bug 28159 - On running Xam.Mac sample 'AnimatingViews' using "Xamarin.Mac .Net 4.5 Framework" as target framework, user gets "System.InvalidCastException".
Summary: On running Xam.Mac sample 'AnimatingViews' using "Xamarin.Mac .Net 4.5 Framew...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Samples ()
Version: Master
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2015-03-18 13:02 UTC by Rajneesh Kumar
Modified: 2015-03-26 13:23 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
VERIFIED FIXED

Comment 1 Timothy Risi 2015-03-18 19:40:16 UTC
Think this might actually be a duplicate of https://bugzilla.xamarin.com/show_bug.cgi?id=28125.  In addition to the InvalidCastException, in the Application Output you see the same error from 28125: 
Could not register the assembly 'Xamarin.Mac': System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.
File name: 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Comment 2 Chris Hamons 2015-03-25 16:04:56 UTC
This caught the nasty brokenness that Aaron saw a week early, I was just too overloaded to notice.

Good catch.

Fixed in latest master. 8fe4401d425c6572388034aaf2eb81aa13392a78
Will be fixed in cycle 5 soon.
Comment 3 Rajneesh Kumar 2015-03-26 13:23:07 UTC
I have checked this issue with the following builds:

Xamarin Studio Version 5.9 (build 308)
Installation UUID: 011d70a5-dede-428b-ab04-ef451c2e539d
Runtime:
Mono 4.0.0 ((detached/57df2b7)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400000111
Apple Developer Tools Xcode 6.2 (6776)
Build 6C131e
Xamarin.Mac Version: 2.0.0.167 (Business Edition)
=== Build Information ===
Release ID: 509000308
Git revision: da9e77e667bc255773fb8a87dcfc009d72c5cc3a
Build date: 2015-03-25 18:34:03-04
Xamarin addins: 1b5102f1e57ad1f6e32eaf535cee66a42441992e
Operating System Mac OS X 10.9.5
Darwin MacMini.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

I observed that Xamarin.Mac sample "AnimatingViews" is working fine. Now, On clicking button "Add" application does't throw any exception, and a 'SQUARE' are added to the view. I have checked other samples :
1. Button Madness.
2. DocAppicon.
3. DrawerMadness. 

Above all samples are also working fine. Here is the screecast: http://www.screencast.com/t/l4OXak6op

This issue has been fixed hence, I am closing this issue.

Thanks!