SLPS Developer Discussion Developer level questions on Code Protection, Licensing, customisation APIs etc
InishTech Support Forums > SLPS Developer Discussion > Integrate Protection/Licensing via Visual Studio/MSBuild Login to add this as a favourite.
User avatar
Member
Member
sclode - 2/7/2017 12:38:32 PM
   
Integrate Protection/Licensing via Visual Studio/MSBuild

 I work on a .net asp.net webforms application and we have been successfully using the code protector platform from visual studio and msbuild following the instructions in KB12 for the last 5-6 years. Licensing checks are done via the [Feature] attribute attached to the Page_load event on the actual pages.

Unfortunately this [Feature] attribute is now not working using a standard Release build. I have followed the troubleshooting instructions on KB12 and can see the following lines in the "Diagnostic" build output in Visual Studio 2015.

18>CustomAfterSlpsProtectorTargets = C:\Program Files (x86)\MSBuild\InishTech\Slps.Protector\Custom.After.Slps.Protector.targets

18>CustomBeforeMicrosoftCommonProps = C:\Program Files (x86)\MSBuild\v14.0\Custom.Before.Microsoft.Common.props

18>CustomBeforeMicrosoftCommonTargets = C:\Program Files (x86)\MSBuild\v14.0\Custom.Before.Microsoft.Common.targets

18>CustomBeforeMicrosoftCSharpTargets = C:\Program Files (x86)\MSBuild\v14.0\Custom.Before.Microsoft.CSharp.targets

18>CustomBeforeSlpsProtectorTargets = C:\Program Files (x86)\MSBuild\InishTech\Slps.Protector\Custom.Before.Slps.Protector.targets

I don't have any of these .target files on my machine which makes me think that perhaps recent updates to my computer could be responsible. eg. moving from visual studio 2013 to 2015. Note - i do have C:\Program Files (x86)\MSBuild\InishTech\Slps.Protector\Slps.Projector.targets though.

Also I do have the InishTech.Licensing.CodeProtector.MSI installed on my machine but I'm not sure if I have the Code Protector SDK installed. I've been trying to find a link to download this SDK but have had no joy.

Is this a known issue with Visual Studio 2015/MSBuild 14.0? 

Is there a way I can check whether I have this SDK installed and/or whether it can still be downloaded?


User avatar
Member
Member
ServiceAdmin - 2/7/2017 3:11:30 PM
   
RE:Integrate Protection/Licensing via Visual Studio/MSBuild

Hi Stuart,

When using the Microsoft.Licensing tooling integrated in Visual Studio, the Custom.After.Microsoft.Common.targets file is installed to the appropriate MSBuild folder during the installation of Code Protector. In the case of visual Studio 2015 this is the C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.Targets\ImportAfter folder

If you have migrated from VS2013 to VS2015, you need to either:

  • Reinstall code protector
  • or
  • Manually copy "C:\Program Files (x86)\MSBuild\<Version>\Microsoft.Common.Targets\ImportAfter\Custom.After.Microsoft.Common.targets" from old version to the new.

While the latter approach is the simplest and quickest approach we do recommend that customers migrate to the latest version of the runtime whenever possible.

If you install the latest Code Protector from your Software Potential account, you will also need to update your permutation and then install the updated permutation in Code Protector. (Please note the permutation upgrade process is irreversible and so you should download and back up your current permutation before you upgrade it.)

To update your permutation:

  1. Login to your Software Potential account
  2. Select the Develop - > Manage Permutations option in the main menu - a table of all available permutations will be displayed.
  3. Select the permutation to be upgraded – the selected permutation will be highlighted in the table of available permutations
  4. Click Update – the Status field of the permutation should change to “Pending”
  5. Click Refresh periodically to check the progress of the update process - the duration depends on the load on the permutation generator.
  6. When the Status field shows “Done” the permutation has been successfully updated. You can see the new version number in the Version column.

You can now download the permutation file by clicking the Permutation download link for the updated permutation and saving to an appropriate location for later use with the corresponding Code Protector version. 

You will also need to download the corresponding Code Protector version by clicking on the Code Protector download link for the updated permutation.

Hope this helps.

John


User avatar
Member
Member
sclode - 2/7/2017 4:29:59 PM
   
RE:Integrate Protection/Licensing via Visual Studio/MSBuild

 Thanks. Copying the Custom.After.Microsoft.Common.targets file into the C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.Targets\ImportAfter folder has sorted out the issue.


1

There are currently no users on-line.

  • Sticky
  • Locked sticky
  • Hot sticky
  • Hot locked sticky
  • Thread
  • Hot thread
  • Locked thread