Forum Xamarin.Mac


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

System.Drawing and Xamarin.Mac FAQ

ChrisHamonsChrisHamons USForum Administrator, Xamarin Team Xamurai
edited April 2017 in Xamarin.Mac

System.Drawing is a popular drawing API and multiple times a month people ask questions on it's use with Xamarin.Mac. Here are some frequently asked questions:

  • System.Drawing is not part of the supported target framework sets for Unified Xamarin.Mac projects. This means unless you choose the "Unsupported Framework" option, you should not be able to resolve System.Drawing.dll from your system mono. This is intentional.
  • The System.Drawing implementation in mono depends on a native library called libgdiplus, which has broken multiple times on OS X and caused a number of painful customer issues over the years.
  • There was a bug in cycle 6 (XM 2.4) where if you had certain versions of mono installed you could inadvertently resolve System.Drawing.dll from your system GAC, and it would appear to work for awhile. This has been fixed in cycle 7, as this was unsafe and could cause crashes in some cases.
  • If you really want to use System.Drawing with Xamarin.Mac, I suggest taking a look at the implementation built on top of CoreGraphics.
This discussion has been closed.