Measurement Studio Forms Licenses are Not Working

Updated Sep 15, 2020

Issue Details

I'm using Measurement Studio with some of the WPF forms that it provides, and I have generated the relevant license file using NI's online tool for generating the .licx files , but when I try to run my application it indicates an error like the following.

A first chance exception of type "System.ComponentModel.LicenseException" occured in .....

Why does this happen and what do I need to do to get these licenses working correctly.

Solution

This error may be happening because of the value of the PublicKeyToken that is included in the .licx file, it is important to make sure that it matches the versions of the .NET framework and Measurement Studio versions that are in use.

To check if this is correct, open the .licx file being used, and compare the value of this PublicKeyToken with the one that is generated on our online tool for the specific version of Measurement Studio and .Net Framework, if these do no match change them manually so that the key in the .licx file does match what is expected.