Class Library Licenser Is Unlicensed Error in Measurement Studio

Updated May 24, 2024

Reported In

Software

  • Measurement Studio

Programming Language

  • C# .NET
  • Visual Basic .NET

Issue Details

  • I am using one of my old projects on my new version of Measurement Studio and when trying to compile the program I get the following error message.
NationalInstruments.NetworkVariable.NetworkVariableLicenser is unlicensed.
 
  • I upgraded Measurement Studio, and now when I call the Analysis Enterprise Library I get the following error. 
NationalInstruments.Restricted.AnalysisLicenser is unlicensed. 
 
  • NI graphs and controls do not show up correctly in the designer view (WPF) and show error code XDG0062.

Solution

Licensing errors in Measurement Studio can be caused by improper licensing of the Measurement Studio extension or an incorrect deployment of license files that contain the libraries' license references. This type of exception can also happen if the Measurement Studio version has been upgraded and the references in the project have not been updated. Please follow these troubleshooting steps to fix the issue:
  • If you are upgrading from a previous version of Measurement Studio or the version of the assemblies in the license file (.licx) do not match the referenced DLLs, follow these steps:
  1. Open the project in Visual Studio and click on Extensions >> Measurement Studio Update Measurement Studio Project References.
  2. Select Extensions >> Measurement Studio >> Refresh Project License
  3. Delete previous files in the output folder by cleaning the solution. Click on Build >> Clean Solution.
  4. Rebuild the application and run it.
  • Make sure that your solution references are from the correct edition of the software you are using. For example, if you are using Measurement Studio Base or Professional editions, use NationalInstruments.Analysis.[Base or Professional] instead of NationalInstruments.Analysis.Enterprise as a dependency:
  • Ensure you have the proper Development System activated. For this, open the NI License Manager and check that the Development edition of the Measurement Studio you are using is licensed.
image.png
 

Additional Information

Microsoft .NET Framework language compilers embed Measurement Studio licenses into your assembly every time you build an assembly that references a Measurement Studio licensed class library. The compilers use Microsoft License Compiler to do this. The input to License Compiler is a licenses.licx file that contains a list of licensed types and the assemblies that contain these licensed types. At compile time, License Compiler obtains licenses from NI License Manager for the Measurement Studio components listed in the licenses.licx file, which the .NET language compiler embeds into the assembly as a resource.