10-23-2009 01:45 PM
I am developing a new application that uses Measurement Studio 8.6 controls which builds on a continuous integration build server that does not have Visual Studio 2008 installed. The output of this build process is an .msi file that installs the application and all of the required assemblies. I am using WiX to create the installer, and due to some WiX errors using the NI merge modules, I am using the XCOPY deployment instructions to ensure all required DLLs make it into the destination folder. Everything builds with no issues, but when the program is executed I receive an exception:
System.ComponentModel.LicenseException: NationalInstruments.UI.WindowsForms.WaveformGraph 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.ValidateInternal(Type type, Object instance, Boolean allowExceptions, License& license)
at System.ComponentModel.LicenseManager.Validate(Type type, Object instance)
at NationalInstruments.UI.WindowsForms.WaveformGraph..ctor()
When developing the app on my dev machine, the appropriate .licx files are generated and placed in source control so they can be used by the build machine when building the application for deployment. I also installed a Measurement Studio 8.6 on the build machine to see if that would resolve the issue, but it didn't seem to have any effect. What am I missing here? How can I make this exception go away???
10-26-2009 06:04 PM - edited 10-26-2009 06:05 PM
gferreri,
I think this may relate to this known issue, do you think you can try the workaround listed:
133384 Return | In some instances, running your Visual C++ project results in unlicensed exceptions. In Visual C++/CLI projects, when you drop a Measurement Studio control on a form, Visual Studio references the Measurement Studio assemblies from the GAC. If you select Measurement Studio»Refresh Project License File, the contents of the .licx file are cleared. Without the proper contents in the .licx file, running your project results in unlicensed exceptions. Workaround: To refresh the .licx file, select Measurement Studio»View .NET Class Library Wizard. In the Measurement Studio .NET Class Library Wizard dialog box, deselect the Measurement Studio libraries and close the dialog box. Run the Measurement Studio .NET Class Library Wizard again and select the Measurement Studio libraries.
|
You also might try the solutions in these forums.
10-27-2009 10:25 AM
Thanks for the reply. I just had to re-install Measurement Studio on the build machine, and now the build is working. Seems that I didn't install Measurement Studio the first time around like I thought I had.
My next point of concern is the apparent incompatibility between the National Instruments merge modules and WiX (Windows Installer Xml). Wix generates several errors that make it impossible to use all of the merge modules when building an installer project. I know this has been documented in another forum post but I haven't been able to identify any solution other than to include the required .dlls via the XCOPY method listed in the NI documentation.
Thanks,
--Greg
10-28-2009 03:25 PM
Hi Greg,
Perhaps your WiX issues are related to this post I just replied to?
Best Regards,