![]() | 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.
![]() |
---|
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.
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:
Open your project in Visual Studio.
Go to your project's Properties.
Go to the Publish item.
Click on the Application Files... button - it will open a list of files that are required by the distribution.
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.
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.
Change the Publish Status field of the required assemblies from Prerequisite to Include and accept all changes.
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.
Run the .NET command prompt (Start >> Programs >> Microsoft VS.NET >> VS.NET Tools >> VS.NET prompt)
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*
![]() |
---|
The *.Design.dll assemblies may not be deployed to end-users under any circumstance. |
Platform | Platform Target | File name |
---|---|---|
Windows | x86 | x86\pdfium.dll |
Windows | x64 | x64\pdfium.dll |
Windows | AnyCPU | Both
|
Mac OS | libpdfium.dylib |
Identity | File name |
---|---|
Patagames.Pdf | Patagames.Pdf.dll |
Identity | File name | Controls |
---|---|---|
Patagames.Pdf.WinForms | Patagames.Pdf.WinForms.dll | WinForms controls for viewing and manipulating PDF |
Patagames.Pdf.Wpf | Patagames.Pdf.Wpf.dll | WPF controls for viewing and manipulating PDF |