Xamarian Crossplatform Itextsharp

时间:2018-04-23 06:11:17

标签: xamarin.forms xamarin.android

我是Xamarian跨平台的新手。我无法在我的项目中安装任何软件包。 我需要在我的项目中安装ITextSharp软件包。

我尝试安装但是我遇到了一些错误: -

  

Install-Package:NU1202:软件包iTextSharp-LGPL-BouncyCastle 4.1.6与xamarinios10(Xamarin.iOS,Version = v1.0)不兼容。包装iTextSharp-LGPL-BouncyCastle   4.1.6支持:      - net(.NETFramework,Version = v0.0)      - net20(.NETFramework,Version = v2.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp 5.5.13与xamarinios10(Xamarin.iOS,Version = v1.0)不兼容。包iTextSharp 5.5.13支持:net   (.NETFramework,版本= V0.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包BouncyCastle 1.7.0与xamarinios10(Xamarin.iOS,Version = v1.0)不兼容。包BouncyCastle 1.7.0支持:      - net20(.NETFramework,Version = v2.0)      - net40-client(.NETFramework,Version = v4.0,Profile = Client)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp-LGPL-BouncyCastle 4.1.6与xamarinios10(Xamarin.iOS,Version = v1.0)/ win不兼容。包   iTextSharp-LGPL-BouncyCastle 4.1.6支持:      - net(.NETFramework,Version = v0.0)      - net20(.NETFramework,Version = v2.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包BouncyCastle 1.7.0与xamarinios10(Xamarin.iOS,Version = v1.0)/ win不兼容。包BouncyCastle 1.7.0支持:      - net20(.NETFramework,Version = v2.0)      - net40-client(.NETFramework,Version = v4.0,Profile = Client)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp 5.5.13与xamarinios10(Xamarin.iOS,Version = v1.0)/ win不兼容。包iTextSharp 5.5.13支持:net   (.NETFramework,版本= V0.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp-LGPL-BouncyCastle 4.1.6与xamarinios10(Xamarin.iOS,Version = v1.0)/ win-x64不兼容。包   iTextSharp-LGPL-BouncyCastle 4.1.6支持:      - net(.NETFramework,Version = v0.0)      - net20(.NETFramework,Version = v2.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包BouncyCastle 1.7.0与xamarinios10(Xamarin.iOS,Version = v1.0)/ win-x64不兼容。包BouncyCastle 1.7.0支持:      - net20(.NETFramework,Version = v2.0)      - net40-client(.NETFramework,Version = v4.0,Profile = Client)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp 5.5.13与xamarinios10(Xamarin.iOS,Version = v1.0)/ win-x64不兼容。包iTextSharp 5.5.13支持:net   (.NETFramework,版本= V0.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp-LGPL-BouncyCastle 4.1.6与xamarinios10(Xamarin.iOS,Version = v1.0)/ win-x86不兼容。包   iTextSharp-LGPL-BouncyCastle 4.1.6支持:      - net(.NETFramework,Version = v0.0)      - net20(.NETFramework,Version = v2.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包BouncyCastle 1.7.0与xamarinios10(Xamarin.iOS,Version = v1.0)/ win-x86不兼容。包BouncyCastle 1.7.0支持:      - net20(.NETFramework,Version = v2.0)      - net40-client(.NETFramework,Version = v4.0,Profile = Client)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:NU1202:软件包iTextSharp 5.5.13与xamarinios10(Xamarin.iOS,Version = v1.0)/ win-x86不兼容。包iTextSharp 5.5.13支持:net   (.NETFramework,版本= V0.0)   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

     

Install-Package:程序包还原失败。回滚“HomeApplication_V4.iOS'”中的软件包更改。   在行:1个字符:1   +安装包装iTextSharp-LGPL-BouncyCastle -Version 4.1.6   + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~       + CategoryInfo:NotSpecified:(:) [Install-Package],Exception       + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand   关于我的项目的任何建议。

请给我一些建议。 我需要做些什么关于xamarinios10(Xamarin.iOS,Version = v1.0)/ win。 我也尝试过Itextsharp V4.17,但错误仍然相同。

2 个答案:

答案 0 :(得分:0)

您尝试安装的版本与Xamarin不兼容。您必须安装库的Xamarin端口。它基于版本4.1.6并因此获得LGPL许可,这比Affero GPL更加宽松,更多当前版本的iTextSharp获得许可。无论如何,它没有得到维护。在NuGet上,只有一个版本(0.1.0)大约三年前上传。如果它足够了,很好,但我会彻底测试(至少你需要的功能)。

可以从Nuget(请参阅here)或Bitbucket(here)获取。

FWIW,Xamarin也有一个PdfSharp端口(参见here),但它看起来似乎也没有。

答案 1 :(得分:0)

您可以参考我的回答:Install itext7 in Xamarin

iText Software已发布了iText 7的Xamarin端口,该端口将支持.NET Standard 1.6及更高版本。

在您的Xamarin Forms项目中,您可以安装itext7 nuget包。