I'm using xfinium library (http://www.xfiniumpdf.com/) to generate pdf in my app. Everything works fine in debug mode, but in release mode code fails with the exception
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'System.Drawing.GDIPlus' threw an exception. ---> System.DllNotFoundException: gdiplus
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x000b0] in <cc5085378d934997a7b811d65661a6ac>:0
--- End of inner exception stack trace ---
at System.Drawing.Bitmap..ctor (System.String filename, System.Boolean useIcm) [0x00022] in <cc5085378d934997a7b811d65661a6ac>:0
at System.Drawing.Bitmap..ctor (System.String filename) [0x00000] in <cc5085378d934997a7b811d65661a6ac>:0
at (wrapper remoting-invoke-with-check) System.Drawing.Bitmap:.ctor (string)
at Xfinium.Pdf.Graphics.PdfImage..ctor (System.String fileName, System.Int32 frame) [0x00006] in <6d56863068554f42b6db33640603cec4>:0
at Xfinium.Pdf.Graphics.PdfImage..ctor (System.String fileName) [0x00000] in <6d56863068554f42b6db<…>
Here is my release configuration options
Target Framework: Xamarin.Mac Full