Click or drag to resize

Application Deployment

When you use Patagames Pdf.Net SDK in your application, your application must have references to several of Patagames assemblies. These references are automatically added to your project when you drag and drop controls or component on your form. There is one assembly required in general and the rest are added only if you are using a specific control that requires some other assembly. In sum, most of the time you will not have to add references to all Patagames assemblies.

Deployment Strategies

Note  Note

Please do not use Patagames installer to install Patagames assemblies to your clients' machines. Patagames installer should be used only for the developers' machines


This is the simplest strategy. For each Patagames assembly reference in the Solution Explorer, open its context menu, click on properties and in the property grid set the Copy Local property of the reference to True.

Assembly Properties

Thus these Patagames assemblies will be copied to your Release/Bin, Debug/Bin folders. You application deployment consists of copying the exe, dlls, xmls files to your client machines which in the simpler case will be manual copy and in the more advanced scenario will be a copy by your installer.

The pdfium.dll library(s) must be placed next to your application, either in the root or the x86 or x64 sub directory. The easiest way to accomplish this is by changing the properties of that file, changing the Copy to Output Directory setting to Copy always.


By default, when preparing a ClickOnce distribution of a Application, VS uses its default settings, which assume that all project assemblies located in the GAC of the local machine are also available on the remote server. By default, the CopyLocal property for assemblies located in the GAC is set to false, and they are marked as prerequisites in the application manifest (meaning that ClickOnce expects these to already be present in the remote machine's GAC. As a result, the application does not pack them). This is may cause problems if the assemblies are not registered in the remote server's GAC.

Here are several simple steps on how to deploy a Application using ClickOnce:

  1. Open your project in Visual Studio.

  2. Go to your project's Properties.

  3. Go to the Publish item.

  4. Click on the Application Files... button - it will open a list of files that are required by the distribution.

  5. There is a small checkbox at the bottom left corner of the opened Application Files form. If it is not checked, tick it to see all files required by the distribution.

  6. You will see all the required assemblies (that are registered in the GAC) probably with a publish status of Prerequisite(Auto) - this means that the installation assumes the assemblies will be available in the target machine GAC before the installation takes place.

  7. Change the Publish Status field of the required assemblies from Prerequisite to Include and accept all changes.

  8. Republish the project to check that all is OK.


As noted above, Patagames assemblies may be installed in the GAC on the developer machines. You may choose to insert Patagames assemblies in the GAC of your client machines too by the following instructions.

  1. Run the .NET command prompt (Start >> Programs >> Microsoft VS.NET >> VS.NET Tools >> VS.NET prompt)

  2. Start the gacutil.exe tool with -i parameter (install) and the full path to the assemblies DLL. For example:

    • gacutil.exe -i "c:\Program Files (x86)\Patagames Software\Pdf.Net SDK\net45\Patagames.Pdf.dll"

    • gacutil.exe -i "c:\Program Files (x86)\Patagames Software\Pdf.Net SDK\net45\Patagames.Pdf.WinForms.dll"

To get information on the the assembly attributes (Version, Culture, PublicKeyToken), run the gacutil /l command which will return a list of all the assemblies in the GAC. You can also see the information associated with a particular assembly using the -l parameter. For example:

  • gacutil -l Patagames.Pdf*

Files and Assemblies for distribution

Note  Note

The *.Design.dll assemblies may not be deployed to end-users under any circumstance.

Files that you need to redistribute depending on Platform Target of your application


Platform Target

File name










  • x86\pdfium.dll


Mac OS


Assemblies that you should redistribute in all scenarios


File name



Optional assemblies


File name




.Net 5.0 and later versions. Contains GDI-dependent classes and extensions.

Assemblies that you need to redistribute depending on which controls you use in your application


File name




WinForms controls for viewing and manipulating PDF



WPF controls for viewing and manipulating PDF



UWP controls for viewing and manipulating PDF