1. Home
  2. Getting Started
  3. Licensing
  4. Use an Assembly Private Name

Use an Assembly Private Name

◷ Reading Time: 2 minutes


In some scenarios you would rather not to sign your assembly with any SNK key, but the environment license requires a unique identifier for you and your application. In this case, you can use an Assembly Private Name to assign an environment license to your application.

To avoid the strong name signing and in order to use an SNK for your identifier, as well as using an Assembly Private Name, you need to follow the steps below:

  1. Create an SNK file
  2. Extract the public key token
    1. Extract the public key file
    2. Generate a public key token from the public key file
  3. Send us the pubic key token and a list of the assemblies that have the Private Name embedded
  4. Create/Generate Assembly Private Name for each assembly using the same SNK file
  5. Add the Assembly Private Name to the AssemblyInfo.cs for each individual assembly


Generate SNK file

SNK files are a pair of public/private keys that allow you to sign your assembly. Also, these are required for the Assembly Private Name. To learn how to create an SNK file, please visit Microsoft website. In short, you can use sn.exe with the following format:

sn.exe -k snk-file-name

Extract Public Key Token

To extract your public key token, you need to first extract your public key from the SNK file.

sn -p snk-file-name public-key.snk

At that point, you can generate the public key token from your public key (i.e., public-key.snk)

sn -t public-key.snk
Updated on April 19, 2020

Was this article helpful?

Related Articles