1-949-236-6510    

HOWTO: License a .NET 6 / 8 / 9 Application (embedding license in an exe)

Table of Contents

NOTE:

HOWTO: License an EXE for Deployment (.NET Framework)

Back to Top

Licensing for .NET 6 / .NET 8

For .NET 5 or later, the License Compiler is not supported. Instead, use the Atalasoft License Compiler (AtalasoftLicenseCompiler.exe) provided via a NuGet package to transform and embed the license binary resource. Just like the License Compiler, the Atalasoft License Compiler takes the licenses.licx file that was generated or updated by Windows Form Designer or added manually, transforms the file into a .licenses binary resource, and embeds it into the project output.

The Atalasoft License Compiler can be run separately, and it uses the same command-line arguments as the License Compiler, as in this example:

AtalasoftLicenseCompiler.exe/complist:<licenses.licx_path>/outdir:<result_folder_path> /target:<application_name>/i:"<refassembly1>;<refassembly2>;<refassembly3>;..;<refassemblyN>"

But to embed licensing, you need to install the Atalasoft.dotImage.AtalasoftLicenseCompiler.x86 or Atalasoft.dotImage.AtalasoftLicenseCompiler.x64 NuGet package for .NET 6 project. The NuGet package includes AtalasoftLicenseComplier.exe and the appropriate targets and instructions for *.licenses generation. Targets are added to the .csproj file during compilation.

To use the Atalasoft License Compiler, follow these steps:

  1. Install the NuGet package, either
    Atalasoft.dotImage.AtalasoftLicenseCompiler.x86
    or
    Atalasoft.dotImage.AtalasoftLicenseCompiler.x64.
  2. Create or add the licenses.licx file.
    If you create the file, make sure it is in <project folder>/Properties/HOWTO: License an EXE for Deployment (.NET Framework) on the Atalasoft website.
  3. Build the project.
    During compilation, the following takes place:
    1. The AtalasoftLicenseComplier.exe utility and necessary assemblies are copied to/lib.
    2. The .licenses file is generated and embedded into the resulting application file.
  4. Check the build log file for any errors.
  5. Most common errors include "unable to find Atalasoft.dotImage.lic in the following locations" followed by a list of 3 locations - the default and preferred location should be
    c:\users\YOUR_USERNAME\AppData\Local\Atalasoft\DotImage 11.5\ (for version 11.5.x.x.xxxx etc...)
    Other errors related to "invalid license signature" or "License version out of date" have specific meanings - in cases such as this please create a support case

If the license is not found for the assembly, an error message is added to the build log, but the build does not fail.

This means that upon successful build you should test your embedded license exe

HOWTO: Verify That You Have Successfully Embedded Licensing in EXE

Back to Top

AtalasoftLicenseCompiler.exe is for .NET 6 AND UP.. #{atalasoftlicensecompilerexe-is-for-net-6-and-up}

It has recently come to our attention that some customers have been misled by some confusing wording on the Atalasoft.dotImage.AtalasoftLicenseCompiler.exe.x64 and Atalasoft.dotImage.AtalasoftLicenseCompiler.exe.x86 packages which the description says:

AtalasoftLicenseCompiler.exe utility is created to support licensing mechanism based on .licx and

The wording may lead some to believe this is ONLY .NET 6, but the intent was to explain that this is needed for .NET6 and up (for .NET 8for instance) but not for any .NET Framework as .NET Framework has a built in lc.exe from Microsoft which handles that automatically

AtalasoftLicenseCompiler.exe is absolutely intended for use in .NET 6, 7, 8, and 9

Back to Top

Original Article

Last Update

2025-06-13 - TD

Prev: HOWTO: IISExpress in 64 bit / 32 bit | Next: HOWTO: License an EXE for Deployment (.NET Framework)

Return to KB