iTextSharp 和 Xamarin [英] iTextSharp and Xamarin

查看:21
本文介绍了iTextSharp 和 Xamarin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Xamarin 应用程序中使用 iTextSharp dll,但我无法编译,因为我收到此错误:

I'm trying to use iTextSharp dll in an Xamarin App, but I´m not able to compile because I´ve received this error:

Error       Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Drawing.dll'
   at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
   at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
   at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver)   App2.Android    C:Program Files (x86)MSBuildXamarinAndroidXamarin.Android.Common.targets   1399    2

推荐答案

您需要使用 Xamarin Port.

You need to use Xamarin Port.

Xam.iTextSharpLGPL(安装包 Xam.iTextSharpLGPL)

Xam.iTextSharpLGPL ( Install-Package Xam.iTextSharpLGPL)

您可以从 NuGet 下载包https://www.nuget.org/packages/Xam.iTextSharpLGPL/

You can download package from NuGet https://www.nuget.org/packages/Xam.iTextSharpLGPL/

这篇关于iTextSharp 和 Xamarin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆