PostSharp 6.5 / / Post­Sharp Documentation / Deployment and Configuration / Licensing / Deploying License Keys

Deploying License Keys

This section explains how to install PostSharp license keys.

Whether you are using a free or commercial edition, PostSharp requires you to enter a license key before being able to build a project.

This topic contains the following sections:

Registering a license key using the user interface

Registering a license key using the user interface is the preferred procedures for individual developers and small teams.

To register a license key using the user interface:

  1. Open Visual Studio.

  2. Click on menu PostSharp, then Options.

  3. Open the License option page.

  4. Click on the Register a license link.

  5. Click on Register a license.

    License Wizard 1
  6. Paste the license key and click Next .

    License Wizard 2
  7. Read the license agreement and check the option I agree. Click on Next.

    License Wizard 3
    Tip Tip

    If you are registering the license key on a build server, also check the option Register these settings for all accounts on this machine.

  8. Click Next on the notice regarding license metering.

Installing the license key in your source control

It is possible to install the license key in your source control, so that these settings are automatically applied during the build.

To install the license the in source control:

  1. Create a file named postsharp.config in the root directory of your source repository, or in any parent directory of the Visual Studio project file (*.csproj or *.vbproj).

  2. Add the following content to the postsharp.config file:

    <?xml version="1.0" encoding="utf-8"?>
    <Project xmlns="">
      <License Value="000-AAAAAAAAAAAAAAA"/>

    In this code, 000-AAAAAAAAAAAAAAA must be replaced by the license key or the URL to the license server.

See Configuring Projects Using postsharp.config for details about this configuration file.