DidiSoft OpenPGP Library for .NET is distributed in a ZIP archive.
Inside the ZIP file is located the setup EXE file which installs the library files (DLL files, examples, help files, license agreement, etc.) by default into
C:\Program Files\OpenPGP Library for .NET <version>
- Library DLL files
- NuGet / Azure DevOps
- From Trial version to Production
- System requirements
Library DLL files
The library consists of two DLL files, located at the \Bin folder in the location where the library has been installed. (the default is C:\Program Files\OpenPGP Library for .NET <version>).
The main DLL files listed below, are for standard managed .NET applications including ASP.NET, WPF, WinForms, command line, etc. A list of supported platforms is available in the \Bin folder.
They must be referenced in your project and distributed with your software in order for the library to work.
You will find also additional DLL files in sub folders, that target different variants of the .NET framework. Please check the Documentation.pdf file that ships with the library for additional information.
Referencing the library
In order to use the library in MS Visual Studio®, you need to add a reference to the class library DLL files from within your project.
1. With your project open, in the Solution Explorer right-click the project and click “Add Reference….”
2. Click the “Browse” tab and select the library DLL files
Once the reference has been added you can refer to the various classes from within your project by adding an import directive for the library namespace:
The library is also available via NuGet. Check here for details.
The class library’s runtime is royalty free which means it may be freely distributed with your application. The only files that should be distributed with your application are the class library DLL files.
Installing to the Global Assembly Cache (GAC)
An alternative way to distribute the library files is to place them in the GAC (Global Assembly Cache).
To install them in the GAC you can use the command line tool gacutil that ships with the .NET Framework SDK.
To install the library in the GAC
gacutil.exe /i DidiSoft.Pgp.dll
gacutil.exe /i BouncyCastle.CryptoExt.dll
To remove the library from the GAC
gacutil.exe /u DidiSoft.Pgp
gacutil.exe /u BouncyCastle.CryptoExt
To check is the library installed in the GAC
gacutil.exe /l DidiSoft.Pgp
gacutil.exe /l BouncyCastle.CryptoExt
From the Trial version to Production
By default, the production version setup wizard will overwrite the trial (evaluation) version DLL files and you just have to rebuild and redeploy your application.
If you have chosen a different installation folder for the production version you will have to manually delete the old references and reference the DLL files from the production installation folder.
The upgrade of the library consists of manually deleting the old references and reference the new DLL files from the latest version installation folder.
For NuGet update: Update-Package DidiSoft.Pgp
If there are code-level backward compatibility changes needed for some major versions, they are listed in the Documentation.pdf file that ships with the library.
.NET Framework or .NET Core or Xamarin
IDE: Visual Studio® or Rider
This chapter discussed the setup and deployment of DidiSoft OpenPGP Library for .NET.
After the library has been installed you can start using its OpenPGP functions.