Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

MeasureStudio: From Evaluation to DevSuite, LicenseException

Hi there,

 

I once downloaded a Measurement Studio evaluation copy to use for my VisualStudio 2008 project. After that, we got a license for NI Developer Suite which include Measurement Studio.  However, when I tried to run/debug one of the old project in VS2008, it gave me a "LicenseException". I checked the NI License manager to make sure DevSuite 2009 Q4 installed with a disconnected license (never expire).

How do I get rid of this error?  Please help!

 

FYI, I copy the exxception details below to assist troubleshooting.

 

======================================= 

System.ComponentModel.LicenseException was unhandled
  Message="NationalInstruments.UI.WindowsForms.Led evaluation period has expired."
  Source="NationalInstruments.Common"
  StackTrace:
       at NationalInstruments.Restricted.EvalReleaseLicense.ShowEvalBehavior(Type type, Object instance, String licenseString)
       at NationalInstruments.Restricted.EvalReleaseLicense.ComponentRunTimeCheck(Type type, Object instance, String licenseString)
       at NationalInstruments.Restricted.LicenseBase.a(Type A_0, Object A_1, String A_2)
       at NationalInstruments.Restricted.LicenseBase.RunTimeCheck(LicenseContext context, Type type, Object instance)
       at NationalInstruments.Restricted.LicenseProviderBase.GetLicense(LicenseContext context, Type type, Object instance, Boolean allowExceptions)
       at System.ComponentModel.LicenseManager.ValidateInternalRecursive(LicenseContext context, Type type, Object instance, Boolean allowExceptions, License& license, String& licenseKey)
       at System.ComponentModel.LicenseManager.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
       at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
       at NationalInstruments.UI.WindowsForms.Led..ctor()
       at MKS.Online.MCBTest.MainForm.InitializeComponent() in F:\Users\HZhang\MCBTest\MainForm.cs:line 232
       at MKS.Online.MCBTest.MainForm..ctor() in F:\Users\HZhang\MCBTest\MainForm.cs:line 116
       at MKS.Online.MCBTest.MainForm.Main() in F:\Users\HZhang\MCBTest\MainForm.cs:line 986
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

0 Kudos
Message 1 of 4
(4,002 Views)

Hi Shef,

 

It sounds like your Measurement Studio license file didn't update correctly when you installed the Developer Suite.  You can manually update your licenses.licx file, in an effort to fix this issue.  Try these steps (found in the Measurement Studio Documentation):

 


  1. Ensure that the licenses.licx file is included in your project. In Visual Studio, launch the Solution Explorer, select the project file in the Solution Explorer, and select Project»Show All Files.
    • If licenses.licx file is listed in the project files and it is not grayed out, go to step 2.
    • If licenses.licx file is listed in the project files, but it is grayed out, right-click the file and select Include in Project. Go to step 2.
    • If licenses.licx file is not included in the project or an exclamation mark appears in the file icon, go to step 2.
  2. Select Measurement Studio»Refresh Project License File. The Refresh Project License File automatically updates the licenses.licx file in a Measurement Studio project to the currently referenced Measurement Studio assemblies. If the licenses.licx file is read-only, the file cannot be updated. Make the licenses.licx writeable by right-clicking the file, selecting Properties, and deselecting the Read-only option. Then, select Measurement Studio»Refresh Project License File again.
  3. Rebuild and then run the project. If no unlicensed exception appears, you have updated the licenses.licx file. If you still see an unlicensed exception, try steps 4–8:
  4. Select Tools»Options.
  5. In the Options dialog box, select Measurement Studio»General in the tree on the left. On the right, expand .NET Tools.
  6. In the Automatically Update Projects drop-down list, select True. Click OK.
  7. Remove all Measurement Studio references from the project and re-add them. When you re-add the references, Measurement Studio automatically adds the correct content to the licenses.licx file.
  8. Rebuild and then run the project.


Hopefully this helps to resolve the issue!

 

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 2 of 4
(3,975 Views)

Thank you Stephanie for your reply. Unfortunately the documented steps did not resolve the problem.  Later on I had to remove the evaluation version completely from Control Panel, and then re-installed from the installer from DevSuite. This finally got rid of the license exception.  But your info still helped.

 

Further question: can I use the existing Measurement Studio (8.9.0) for new Visual Studio 2010?  We should not have to upgrade Measurement Studio every time when we upgrade Visual Studio, right?

0 Kudos
Message 3 of 4
(3,966 Views)

Hi Shef,

 

You can use Measurement Studio 2009 (8.9) with Visual Studio 2010; however, the Visual C++ libraries that shipped with MS2009 will not work with VS 2010.  You can read more about that here.  I cannot give you a definite answer on whether or not MS2009 will continue to offer full support for future versions of Visual Studio -- that depends on what changes and updates Microsoft opts to make to their software.  With regards to compatibility between past versions of Visual Studio and Measurement Studio, you can read more here.

 

Also, the current version of Measurement Studio is 2010 (9.0).  Just wanted to let you know!

 

Regards,

 

Stephanie R.

National Instruments

Stephanie R.
National Instruments
0 Kudos
Message 4 of 4
(3,953 Views)