2

I am working with a windows desktop application , which is using PDFtron nuget library. I am using Visual Studio 2017 with .Net Core version as 2.0.5.
To compile the project I need to add reference to the specified PDFTron Nuget library. But whenever I try to install this package, I get following error that it is not compatible. As this library is referenced in almost 80% of the project, I am not able to change it to something else.

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 ==========

What do I need to do to make my project compatible with UWP . (I have read about migrating the library to .NET core but not sure how it will work in my case.)

MrDj05
  • 65
  • 1
  • 7

2 Answers2

1

PDFTron has a separate UWP specific SDK, that is currently only available by filling an evaluation form.

Please fill in this form, and a UWP SDK link will be provided for you. https://www.pdftron.com/pdfnet/mobile/request_trial.html

Ryan
  • 2,473
  • 1
  • 11
  • 14
0

The error message means that the library is not compatible with UWP project. Many .net framework library don't support UWP project. It it's a open source library, you could download its source code and compile a compatible package by yourself.

For example, the latest UWP target version 16299, it supports .Net Standard 2.0. So, you could compile a .Net Standard 2.0 library. Please see Porting to .NET Core - Libraries for more details.

If it's not open source project, you could contact with its owner and let the owner publish a new version for UWP.

Another option is you could use Brokered Windows Runtime Components for a side-loaded UWP app, but if you use the brokered windows runtime components, you could only side-load your UWP app, it would not be able to publish to windows store.

Xie Steven
  • 8,544
  • 1
  • 9
  • 23