System.Drawing.dll ERROR ????

When building I'm receiving this error:

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Drawing.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference, Mono.Cecil.ReaderParameters parameters) [0x00000] in :0
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference reference) [0x00000] in :0
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences (System.Collections.Generic.List1 assemblies, Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0 at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences (System.Collections.Generic.List1 assemblies, Mono.Cecil.AssemblyDefinition assembly) [0x00000] in :0
at Xamarin.Android.Tasks.ResolveAssemblies.Execute () [0x00000] in :0 (xMppAndroid)

Posts

  • FZelleFZelle DEMember ✭✭✭

    That might be because there is no System.Drawing.Dll in Mono for Android.

    Which also means that you are using a DLL that is compiled against the Windows API.

  • BatzeeBatzee LKMember ✭✭

    'System.Drawing' Assembly does not come with Mono for Android

    I got this same error when trying to use a library called ITextSharp.
    But I found a solution , there is a special version of library made for xamarin android in nugets you can find it.
    Its called Xam.iTextSharpIGPL

    So you can try using a different library

  • CheesebaronCheesebaron DKInsider, University mod

    No need to dig up a 2 year old thread.

  • jddjdd USMember ✭✭✭

    I get the same error trying to use Webview with local html base url

    this is the error:
    Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
    Nom de fichier : 'System.Drawing.dll'
    à Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
    à Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
    à Xamarin.Android.Tasks.ResolveAssemblies.Execute() Almicantarat.Droid

  • jddjdd USMember ✭✭✭

    Solved:
    -> Close the solution
    -> Delete all contents of the Packages folder (all the DLL's referenced through Nuget)
    -> Restart the solution
    -> Build (this will cause Nuget to get all DLL's again based on the packages.config)

  • AmirAbdiAmirAbdi USMember ✭✭

    @jdd
    Same problem
    Your solution did not work

Sign In or Register to comment.