System.Drawing and Xamarin.Mac FAQ

ChrisHamonsChrisHamons Chris HamonsUSXamarin Team Xamurai
edited April 19 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.