License key in PSSLN

prabhakar_r's Avatar


04 Oct, 2017 02:43 PM

Should I add the <License> tag in PSSLN in order for solution file to build in TFS build agent?

  1. Support Staff 1 Posted by PostSharp Techn... on 05 Oct, 2017 12:51 PM

    PostSharp Technologies's Avatar


    Build servers don’t need their own license. PostSharp will not attempt to enforce licensing if it detects that it runs in unattended mode.

    If this check does not work for any reason, you may use the license key of any licensed user for the build server. This will not be considered a license infringement. However, it is better to report the issue to our technical support so that we can fix the detection algorithms.

    Adding license key to pssln or postsharp.config is an easy way to share one license key with the team. Please, take a look at Installing the license key in your source control if you want know more details. Installing the license key in your source control doesn't work when your team uses multiple license keys. For large teams I would suggest using license server.


  2. 2 Posted by prabhakar_r on 23 Oct, 2017 12:52 PM

    prabhakar_r's Avatar

    How do I add multiple licenses in PSSLN file?
    Add additional <\License> node under <\Project> ?

  3. Support Staff 3 Posted by PostSharp Techn... on 25 Oct, 2017 08:52 AM

    PostSharp Technologies's Avatar


    you can separate them by semicolon:

    <License Value="license1;license2" />

    In case you are using multiple license keys I would suggest to use license server instead.

    You can also install the license key by running %programdata%\Postsharp\5.0.x\bin.Release\PostSharp.Settings.UI.exe on your TFS build agent. Go Manage Licenses\Register a license\Register a license key, check "Register the license for all accounts on this machine" (this works for commercial licenses only).

    There is another workaround: You can set PostSharpLicense environment variable to your license key on your TFS build agent. Then you don't need to put the license key into pssln file or to use license server.

    Normally build server needs a license key only for PostSharp Diagnostics. If you don't use PostSharp Diagnostics and build still fails on TFS build agent, then the build server detection algorithm may contain a bug.

    Please, could you generate licensing trace from a build on your TFS build agent?

    You can generate a licensing diagnostic log by building your project with the following command line:

    msbuild /p:PostSharpTraceLicensing=True

    The log file is created in the %ProgramData%\PostSharp\LicensingTrace directory. The full path to the log file is mentioned in the build output.


  4. Support Staff 4 Posted by PostSharp Techn... on 06 Nov, 2017 02:44 PM

    PostSharp Technologies's Avatar


    We are going to close this request as there have not been any further updates. Please feel free to reopen the discussion if you need more help.

    PostSharp Team

  5. PostSharp Technologies closed this discussion on 06 Nov, 2017 02:44 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac