Troubleshooting PostSharp license issue on build server: Where can I find my license for PostSharp Express?
Asked Answered
D

3

6

I am experiencing issues with my CI build server in which PostSharp is causing the build to fail with the message: The assembly 'yada-yada.dll' uses non-licensed features (Basic Features). [...]. We are using the current version of PostSharp (3.1.52) and have no troubles with the library in local development environment where developers have a registered Express license.

According to PostSharp docs, the build server should not need a license. However, they acknowledge that the automation identification could fail:

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.

It is recommended to include the license key in the source control.

I'm attempting to test this theory but I can't seem to get access to my actual PostSharp Express license! The PostSharp Options aren't any help either:

PostSharp License Options

Anyone have any ideas? Thanks!

Danielson answered 17/10, 2014 at 17:50 Comment(4)
Software licensing questions (including where to locate your license) should be addressed to the software vendor.Incompressible
I understand, @Ken. PostSharp redirects support for "Express" users through SO. Thanks for the feedback. I'll keep that in mind for the future.Danielson
It is correct that we (PostSharp) provide support for non-commercial users only on StackOverflow.Roux
@GaelFraiteur: That's fine, as long as the questions directed here are on-topic according to this site's guidelines. Licensing and account questions are not, and therefore the question is inappropriate here. The mere fact that you direct them here does not make them appropriate here. If they're code or use questions, they're fine. If they're licensing, purchasing, or any other questions of that sort, they're not. This has been discussed several times on Meta Stack Overflow and Meta Stack Exchange.Incompressible
R
5

You can find your license key under the registry key HKEY_CURRENT_USER\Software\SharpCrafters\PostSharp 3.

Roux answered 17/10, 2014 at 18:20 Comment(5)
Thanks for the quick response! I knew it would be in there somewhere. Of course, it would have been helpful if the license was available from VS options menu, though.Danielson
BTW, @Gael, your support crew should get in touch with Feodor @ AppVeyor as his new Hyper-V environments are apparently not being recognized by PostSharp as an automated build environment.Danielson
I did not understand how can we add the licence key into our code for Appveyor?Culch
@Rıfat, create a new xml document at the root directory of your solution named postsharp.config. The structure is described in the PostSharp documentation. However, please note I had to remove the attribute x:xmlns="http://schemas.postsharp.org/1.0/configuration" from the tag in order to resolve a missing definition for x. As @Gael explained in the answer, you can find the PostSharp key in the registry. The last step is to make sure your new postsharp.config file is added to the repository. That's all it took for us!Danielson
I have installed postsharp express, but there is no value at the registry location "(value not set)". I am trying to find a value to enter into the postsharp.config for use during builds on appveyor.Lustre
L
1

If your license key does not appear at the location specified, these steps will help you find a new one....

Uninstall any previous version of postsharp installed in visual studio by going to TOOLS > Extensions & Updates.

Open regedit. Delete the following registry key (including all child keys):

HKEY_CURRENT_USER\Software\SharpCrafters\PostSharp 3

Download the latest postsharp vs extension. At time of writing I used 4.2.17. Also make sure you are using the latest postsharp nuget package.

Begin the install & follow the steps. When selecting which kind of license you want, choose the Express User License (the last option).

choose post sharp express

Enter your details, then on the penultimate step, do not tick the box to register postsharp for all accounts on this machine.

do no register the license for all accounts

Complete the installation, you should then find the license key in your registry under:

HKEY_CURRENT_USER\Software\SharpCrafters\PostSharp 3\LicenseKey

Lustre answered 18/1, 2016 at 10:52 Comment(1)
I've done tihs and the value of the LicenseKeys registry is still empty..Vasiliki
O
1

There are two types of keys!

  • for current user: HKCU\SOFTWARE\SharpCrafters\PostSharp 3
  • for all users: HKLM\SOFTWARE\WOW6432Node\SharpCrafters\PostSharp 3

The license might be in one of them depending on what license type you chose.

Oogonium answered 3/1, 2017 at 12:23 Comment(1)
Thank you so much. You are a lifesaver.Investment

© 2022 - 2024 — McMap. All rights reserved.