Setup of OpenPGP Library for .NET

DidiSoft OpenPGP Library for .NET is distributed in a ZIP archive.

Inside the ZIP file you will find the library files, including DLL files, examples, help files, license agreement, etc.

Library DLL files

The library consists of two main DLL files, located at the \Bin folder in the ZIP archive.

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.

1) Bin\<Platform>\DidiSoft.Pgp.dll
2) Bin\<Platform>\DidiSoft.BouncyCastle.dll

For example for .NET 5.0 Project you will use:

1) Bin\NET50\DidiSoft.Pgp.dll
2) Bin\NET50\DidiSoft.BouncyCastle.dll

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 the other folders, that target different variants of the .NET framework.

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:

C#
using DidiSoft.Pgp;

VB.NET
Imports DidiSoft.Pgp

NuGet

The library is also available via NuGet. Check here for details how to obtain the library files via NuGet and how to use it inside Azure.

Deployment

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 DidiSoft.BouncyCastle.dll

To remove the library from the GAC
gacutil.exe /u DidiSoft.Pgp
gacutil.exe /u DidiSoft.BouncyCastle

To check is the library installed in the GAC
gacutil.exe /l DidiSoft.Pgp
gacutil.exe /l DidiSoft.BouncyCastle

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.

Upgrading

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 of the Trial version: Update-Package DidiSoft.Pgp.Trial

For NuGet update of the Production version: 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.

System Requirements

.NET Framework or .NET Core or Xamarin

IDE: Visual Studio® or Rider

Summary

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.