This NuGet package enables a .NET application to use a simplified API for validating a license. It is forked from the Standard.Licensing project and fixes some of its issues. It is also an optional companion to the 12noon License Manager X application.
$ dotnet add package LicenseManager_12noon.ClientThis is a graphical front-end for the Standard.Licensing project.
It also includes a client library with an improved API to validate licenses in your application.

License Manager is a graphical front-end application designed to create and manage licenses for software applications using .NET. It leverages the Standard.Licensing project to handle license generation and validation.
This project ensures that software licenses are securely generated and validated, providing a robust mechanism for software protection.
You can download the License Manager application from the Microsoft Store, and it will be updated automatically.
Alternatively, you can download the latest release from the Releases page.
| Property | Usage |
|---|---|
| Passphrase | Secret used to generate public/private keypair and to create a license |
| Public key | Used by the licensed application to validate the license |
| ID | License ID (You can use it any way you want or not at all) |
| Product ID | Used by the licensed application to verify the executable and public key. |
| Lock to assembly | This ensures the license is associated ONLY with THIS build of the licensed application. |
The application maintains the private key in the .private file but does not display it.
| Property | Usage |
|---|---|
| Name | The product name |
| Version | The product version |
| Date published | The date the product was published |
These values can be displayed by the licensed application.
The publish date can represent any date you want.
| Property | Usage |
|---|---|
| Type | Standard or trial license |
| Expiration Date | The date on which the license expires. DateTime.MaxDate.Date means no expiry. |
| Expiration | The number of days until the license expires. Zero means no expiry. |
| Quantity | Minimum value is one (1) |
The licensed application can check the type to permit only certain features.
If the expiration is set to zero, there is no expiry.
The quantity is not enforced.
This information can be displayed by the licensed application.
| Property | Usage |
|---|---|
| Name | Name of the licensee |
| Email of the licensee | |
| Company | Company of the licensee (optional) |
Note that the public key and product ID are passed by the licensed application to validate the license, so you only want to create a new keypair or change the product ID if you want to change them in the licensed application, rebuild it, and create new licenses for anyone who will use the new build.
.private file..lic file.The .private file contains all of the information used to create the license, including the secrets.
Do keep the .private file somewhere safe.
Do NOT add the .private file to source control.
You will need it to create more licenses for your licensed application
(unless you want to update the application to use a new public key).
.private or
.lic file (or both of them). Alternatively, you can drag/drop a .private and/or .lic file.If the license is invalid (e.g., it expired or the assembly has changed), you can create a new (valid) license.
.private file..lic file.Install the LicenseManager_12noon.Client NuGet package in your application.
The licensed application must pass the Product ID and the Public Key to the license validation API.
const string PRODUCT_ID = "My Product ID"; // Copied from the License Manager application
const string PUBLIC_KEY = "The Public Key"; // Copied from the License Manager application
LicenseFile license = new();
bool isValid = license.IsLicenseValid(PRODUCT_ID, PUBLIC_KEY, out string messages);
if (!isValid)
{
// INVALID
MessageBox.Show("The license is invalid. " + messages);
return;
}
// VALID
if (license.StandardOrTrial == LicenseType.Trial)
{
// Example: LIMIT FEATURES FOR TRIAL
}
If the license is valid, you can use any of the properties (e.g., for display or to limit features).
Alternatively, you can use the Standard.Licensing NuGet package to validate the license in your application.
Note: Of course, the hash of Product ID and Public Key will not prevent a determined hacker from working around the license. However, it will prevent a simple text substitution of the public key.
You could also do something more involved, such as prompting the licensee the first time they run the application to enter some secret text (e.g., a password or GUID) and storing a hash of it and the public key in protected storage. Then the application could use the hash as the Product ID. Of course, the licensee would have to keep that text as secret as they should keep the license file.
The project includes an example client application that demonstrates how to use the client NuGet library to validate a license and access the license's information.