title: System.Drawing.BitmapSuffixInSameAssemblyAttribute missing in mono
body: <p>I have a .NET MVC 5 application that I've been developing in Windows for some time. I'd like my Web Designer, who uses a Mac, to be able to run and edit the app locally on his Mac.</p>
  
  <p>Short of building a Windows VM, Mono + Monodevelop/Xamarin Studio seems to be the best way to accomplish this.</p>
  
  <p>When we first built the project, we got <a href="https://stackoverflow.com/questions/27326382/">an error about the System.Web.Entity.dll reference not loading</a>. <a href="https://stackoverflow.com/a/34750186/1524502">We fixed that</a>.</p>
  
  <p>Now, though, we're getting an error that something is missing from the System.Drawing namespace.</p>
  
  <pre><code>System.TypeLoadException
  Could not load type 'System.Drawing.BitmapSuffixInSameAssemblyAttribute' from assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
  
  Description: HTTP 500.Error processing request.
  Details: Non-web exception.
  Exception stack trace:
    at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)
    at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType, Boolean inheritedOnly) [0x00019] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/System/MonoCustomAttrs.cs:128 
    at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, Boolean inherit) [0x00017] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/System/MonoCustomAttrs.cs:290 
    at System.Reflection.Assembly.GetCustomAttributes (Boolean inherit) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/System.Reflection/Assembly.cs:244 
    at Owin.Loader.DefaultLoader.SearchForStartupAttribute (System.String friendlyName, IList`1 errors, System.Boolean&amp; conflict) [0x0002c] in &lt;filename unknown&gt;:0 
    at Owin.Loader.DefaultLoader.GetDefaultConfiguration (System.String friendlyName, IList`1 errors) [0x0000e] in &lt;filename unknown&gt;:0 
    at Owin.Loader.DefaultLoader.LoadImplementation (System.String startupName, IList`1 errorDetails) [0x0001e] in &lt;filename unknown&gt;:0 
    at Owin.Loader.DefaultLoader.Load (System.String startupName, IList`1 errorDetails) [0x00000] in &lt;filename unknown&gt;:0 
    at Microsoft.Owin.Host.SystemWeb.OwinBuilder.GetAppStartup () [0x00021] in &lt;filename unknown&gt;:0 
    at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint () [0x0000d] in &lt;filename unknown&gt;:0 
    at System.Threading.LazyInitializer.EnsureInitializedCore[T] (System.Threading.T&amp; target, System.Boolean&amp; initialized, System.Object&amp; syncLock, System.Func`1 valueFactory) [0x00037] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/threading/LazyInitializer.cs:241 
    at System.Threading.LazyInitializer.EnsureInitialized[T] (System.Threading.T&amp; target, System.Boolean&amp; initialized, System.Object&amp; syncLock, System.Func`1 valueFactory) [0x00012] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/threading/LazyInitializer.cs:206 
    at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init (System.Web.HttpApplication context) [0x00000] in &lt;filename unknown&gt;:0 
    at System.Web.HttpApplication.CreateDynamicModules () [0x00030] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web/HttpApplication.cs:1676 
    at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x000ad] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web/HttpApplication.cs:218 
  </code></pre>
  
  <p>I tried dropping the System.Drawing.dll file (and its associated .xml file) from my Windows box into the /bin folder, re-opening the project in Xamarin Studio, and the error changed to</p>
  
  <pre><code>Application Exception
  System.InvalidProgramException
  Invalid IL code in System.Drawing.BitmapSuffixInSatelliteAssemblyAttribute:.ctor (): method body is empty.
  
  Description: HTTP 500.Error processing request.
  Details: Non-web exception.
  Exception stack trace:
    at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)
    at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType, Boolean inheritedOnly) [0x00019] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/System/MonoCustomAttrs.cs:128 
    at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, Boolean inherit) [0x00017] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/System/MonoCustomAttrs.cs:290 
    at System.Reflection.Assembly.GetCustomAttributes (Boolean inherit) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/corlib/System.Reflection/Assembly.cs:244 
    at Owin.Loader.DefaultLoader.SearchForStartupAttribute (System.String friendlyName, IList`1 errors, System.Boolean&amp; conflict) [0x0002c] in &lt;filename unknown&gt;:0 
    at Owin.Loader.DefaultLoader.GetDefaultConfiguration (System.String friendlyName, IList`1 errors) [0x0000e] in &lt;filename unknown&gt;:0 
    at Owin.Loader.DefaultLoader.LoadImplementation (System.String startupName, IList`1 errorDetails) [0x0001e] in &lt;filename unknown&gt;:0 
    at Owin.Loader.DefaultLoader.Load (System.String startupName, IList`1 errorDetails) [0x00000] in &lt;filename unknown&gt;:0 
    at Microsoft.Owin.Host.SystemWeb.OwinBuilder.GetAppStartup () [0x00021] in &lt;filename unknown&gt;:0 
    at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint () [0x0000d] in &lt;filename unknown&gt;:0 
    at System.Threading.LazyInitializer.EnsureInitializedCore[T] (System.Threading.T&amp; target, System.Boolean&amp; initialized, System.Object&amp; syncLock, System.Func`1 valueFactory) [0x00037] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/threading/LazyInitializer.cs:241 
    at System.Threading.LazyInitializer.EnsureInitialized[T] (System.Threading.T&amp; target, System.Boolean&amp; initialized, System.Object&amp; syncLock, System.Func`1 valueFactory) [0x00012] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/external/referencesource/mscorlib/system/threading/LazyInitializer.cs:206 
    at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init (System.Web.HttpApplication context) [0x00000] in &lt;filename unknown&gt;:0 
    at System.Web.HttpApplication.CreateDynamicModules () [0x00030] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web/HttpApplication.cs:1676 
    at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x000ad] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Web/System.Web/HttpApplication.cs:218 
  Version Information: 4.2.1 (explicit/6dd2d0d Fri Nov 6 12:25:19 EST 2015); ASP.NET Version: 4.0.30319.17020
  </code></pre>
  
  <p>How can my designer run this .NET MVC 5 app natively on his Mac?</p>