Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

License question - invocation of the constructor

Solved!
Go to solution

Hi

I have developed  a WPF application using Measurement studio 2013 Pro and just switched from framework 4.5 to 4.0. I followed the steps in following document:

http://forums.ni.com/ni/attachments/ni/232/14673/1/Using%20.NET%204.0%20Measurement%20Studio%20Assem...

 

In step 6 it states that I should update the license file manually. On the other hand this document states that I can use the integrated tools to update the file:
http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/licensingnetwithoutintegratio...

 

Anyway I tried to perform the update using the Integrated tools. I followed the steps in this document:

http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/licensingnetwithintegration/

 

The project compiles but I get the following runtime error:

 

A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: 'The invocation of the constructor on type 'NationalInstruments.Controls.PowerButton' that matches the specified binding constraints threw an exception.' Line number '92' and line position '22'.

An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: 'The invocation of the constructor on type 'NationalInstruments.Controls.PowerButton' that matches the specified binding constraints threw an exception.' Line number '92' and line position '22'.

 

Unhandled Exception: 'NoLoadTest_Test.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\diasymreader.dll', Cannot find or open the PDB file.

System.Windows.Markup.XamlParseException: 'The invocation of the constructor on type 'NationalInstruments.Controls.PowerButton' that matches the specified binding constraints threw an exception.' Line number '92' and line position '22'. ---> System.ComponentModel.LicenseException: NationalInstruments.Controls.Internal.WpfStandardLicenser is unlicensed.

   at NationalInstruments.Restricted.LicenseBase.ShowUnLicensedBehavior(Type type, Object instance)

   at NationalInstruments.Restricted.LicenseBase.a(Type A_0, Object A_1, String A_2)

   at NationalInstruments.Restricted.LicenseBase.a(Type A_0, Object A_1)

   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.Validate(Type type, Object instance)

   at NationalInstruments.Controls.Internal.WpfStandardLicenser..ctor(Type licensedType)

 

The licenses file is empty after I have selected Refresh project license file.

Can you please help me?

Kind regards

/Axel

0 Kudos
Message 1 of 3
(7,753 Views)
The integrated tools only target one version of the.NET framework for each version of Visual Studio. For VS2010, the target framework is .NET 4; for VS2012, the target framework is.NET 4.5. Since your project has no 4.5 NI assemblies, the integrated tools did not add any entries to the license file.

You will need to either open the project in VS2010 and run the integrated tools there, or update the license file manually.
~ Paul H
0 Kudos
Message 2 of 3
(7,743 Views)
Solution
Accepted by topic author AxelHaraldsson

OK thanks

/Axel

0 Kudos
Message 3 of 3
(7,737 Views)