Using the NuGet Package
You can find the PSPDFKit for Windows NuGet package on nuget.org. Alternatively, you can configure your solution to look for the NuGet package in the SDK ZIP file. This can be useful for situations in which, for example, your build machines don’t have access to the internet.
Rather than targeting a package held at nuget.org, you may set up a configuration to point to a local package.
To do this, first you will need to create a file,
nuget.config, in the same directory as your solution file if one is not already present (e.g.
The contents of the file should contain an XML element,
packageSources — which describes where to find NuGet packages — as a child of a root node named
configuration. If the file already exists, add the extra
packageSources entry shown below. If the file is blank, copy and paste the entirety of the following contents:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="PSPDFKitSource" value="path\to\directoryContainingNupkg" /> </packageSources> </configuration>
value of the contents to correctly refer to the location of the directory containing the
PSPDFKitUWP.*.*.*.nupkg package — for example,
C:\Users\me\nugetPackages\. Now save the file, and close and reopen your solution for Visual Studio to force a read of the NuGet configuration.
Open your app’s solution, and in the Solution Explorer, right-click on References and click on the menu item Manage NuGet Packages…. This will open the NuGet Package Manager for your solution.
pspdfkituwp and you will find the package on nuget.org.
Alternatively, if you have decided to use a local package source, on the right-hand side of the manager in the Package source dropdown window, choose the entry
PSPDFKitSource (or whatever you decided to name it). You should then see the entry for PSPDFKitUWP by PSPDFKit GmbH.
On the right side, in the panel describing the package, click on the Install button to install the package.
Once that is complete, you will see a reference to the package in the Solution Explorer under References.
Note that after adding the reference to the package in this manner and then building your solution from the command line with
msbuild, the switch
/t:restore can be used to restore the package from the source.
Consult the Microsoft documentation for NuGet configuration for more information about what kind of sources you can specify.