xamarin.android 8及更高版本是否支持System.Drawing?

时间:2018-08-29 19:59:29

标签: c# android xamarin system.drawing

我需要在Xamarin.Android项目中使用System.Drawing和System.Drawing.Common,但是无法加载System.Drawing.Common.dll。

据我所知,xamarin.android 8.0和更高版本与.net standard 2.0兼容,因此它应该是开箱即用的。我已经读到无法在xamarin.android中使用这些库,但是这些文章是在xamarin.android 8.0发布之前编写的。

感谢您的回答

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1590,2): error : Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Perhaps it doesn't exist in the Mono for Android profile?
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1590,2): error : Nazwa pliku: 'System.Drawing.Common.dll'
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1590,2): error :    w Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1590,2): error :    w Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1590,2): error :    w Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)

更新

我在网上找到了that。 也许这是这里的问题。然后,在哪里可以找到此.dll?

1 个答案:

答案 0 :(得分:0)

它似乎受支持,但是System.Drawing.Common的NuGet包不是为MonoAndroid正确构建的。