我正在使用一个使用PDFtron nuget库的windows桌面应用程序。我使用VisualStudio2017,.Net核心版本为2.0.5。
要编译该项目,我需要添加对指定的PDFTron Nuget库的引用。但是,每当我试图安装这个软件包时,我都会看到以下错误,即它不兼容。由于这个库在几乎80%的项目中都是引用的,所以我无法将它更改为其他东西。
Restoring packages for 'ABCProject'.
Restoring packages for C:\Users\xxxxxxxxx...
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0.
Some packages are not compatible with UAP,Version=v10.0.
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0 (win10-arm).
Some packages are not compatible with UAP,Version=v10.0 (win10-arm).
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0 (win10-arm-aot).
Some packages are not compatible with UAP,Version=v10.0 (win10-arm-aot).
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0 (win10-x64).
Some packages are not compatible with UAP,Version=v10.0 (win10-x64).
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot).
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0 (win10-x86).
Some packages are not compatible with UAP,Version=v10.0 (win10-x86).
PDFNet 6.7.1.63077 is not compatible with UAP,Version=v10.0 (win10-x86-aot).
Some packages are not compatible with UAP,Version=v10.0 (win10-x86-aot).
Package restore failed for 'ABCProject'.
Package restore failed. Rolling back package changes for 'ABCProject'.
========== Finished ==========我需要做什么才能使我的项目与UWP兼容。(我读过关于将库迁移到.NET核心的文章,但不确定在我的例子中它将如何工作。)
发布于 2018-03-14 03:30:55
PDFTron有一个单独的UWP专用SDK,目前只能通过填写评估表才能使用。
请填写此表格,并为您提供一个UWP SDK链接。trial.html
发布于 2018-03-14 02:40:37
错误消息意味着库与UWP项目不兼容。许多.net框架库不支持UWP项目。它是一个开源库,您可以下载它的源代码并自己编译一个兼容的包。
例如,最新的UWP目标版本16299,它支持.Net标准2.0。因此,您可以编译一个.Net标准2.0库。有关更多细节,请参见移植到.NET核心库。
如果它不是开源项目,您可以与它的所有者联系,让它发布UWP的新版本。
另一个选择是您可以使用为侧加载的UWP应用程序代理Windows运行时组件,但是如果您使用代理windows运行时组件,您只能侧加载您的UWP应用程序,它将无法发布到windows商店。
https://stackoverflow.com/questions/49268065
复制相似问题