Bug 30310 - System.Drawing not working with Xamarin.Mac Unifed Xamarin.Mac .NET 4.5 Framework
Summary: System.Drawing not working with Xamarin.Mac Unifed Xamarin.Mac .NET 4.5 Frame...
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Chris Hamons
Depends on:
Reported: 2015-05-21 12:11 UTC by Dan Smith
Modified: 2015-05-21 17:10 UTC (History)
2 users (show)

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

List of supported Xamarin.Mac 4.5 Unified Assemblies (339.23 KB, image/png)
2015-05-21 12:11 UTC, Dan Smith
Example solution showing the error upon compilation (4.82 MB, application/zip)
2015-05-21 12:13 UTC, Dan Smith

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:

Description Dan Smith 2015-05-21 12:11:50 UTC
Created attachment 11282 [details]
List of supported Xamarin.Mac 4.5 Unified Assemblies

Xamarin Studio reports "Target framework 'System.Drawing.dll' is invalid when targetting Xamarin.Mac 4.5 .NET framwork. (MM1406)", when the System.Drawing assembly is included in the "References" for any project targeting Xamarin.Mac 4.5 Unified framework.  

According to the documentation (http://developer.xamarin.com/guides/mac/advanced_topics/assemblies/), System.Drawing is a supported framework for Xamarin.Mac 4.5.

Steps to reproduce:
1)  Create brand new Xamarin.Mac unified Cocoa project
2)  Change Target Framework to Xamarin.Mac .NET 4.5 Framework (Project Options->General) 
3)  Add new reference for "System.Drawing" (References->Edit References)
4)  Compile Target and see error.
Comment 2 Dan Smith 2015-05-21 12:13:17 UTC
Created attachment 11283 [details]
Example solution showing the error upon compilation
Comment 3 Chris Hamons 2015-05-21 17:10:32 UTC
@Dan - This is actually a documentation bug (which they are looking at fixing now).

System.Drawing is not part of either the Unified Mobile or Unified XM 4.5 profiles. 

If you need that functionality, you may want to look at using:


which implementing most of the API on top of CoreGraphics instead of on libdgiplus, which caused significant pain to our users in the past (which is what Classic uses).


is a library that contains definitions of Point/Color and the like which also may be useful if that is all you need.

Thanks for the bug report though (with a repro case even!)