Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

License error when compiling C# DataSockets examples in Visual Studio 2005

Hi,

I'm trying to build the Measurement Studio 8.0 .NET C# DataSockets example in Visual Studio 2005 with the "Build Solution" option on the build menu. It appears that the build completes successfully except I get two errors in the license files for both the reader and the writer projects. The errors are as follows:

Reader:
Error    1    Exception occurred creating type 'NationalInstruments.UI.WindowsForms.PropertyEditor, NationalInstruments.UI.WindowsForms, Version=8.0.11.236, Culture=neutral, PublicKeyToken=4544464cdeaab541' System.NullReferenceException: Object reference not set to an instance of an object.    C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\DataSocket\ReaderWriter\cs\Reader\licenses.licx    10    Reader

Writer:
Error    2    Exception occurred creating type 'NationalInstruments.UI.WindowsForms.PropertyEditor, NationalInstruments.UI.WindowsForms, Version=8.0.11.236, Culture=neutral, PublicKeyToken=4544464cdeaab541' System.NullReferenceException: Object reference not set to an instance of an object.    C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\DataSocket\ReaderWriter\cs\Writer\licenses.licx    9    Writer

On searching the NI site, I found the following article that describes a similar problem:
http://digital.ni.com/public.nsf/allkb/B4F4871968318365862570D6000B692B

On checking the "copy local" properties for the assemblies referenced in the article, I found that all the "copy local" properties were set to "false" which is what the article specifies as a solution to the problem.

Is there a solution for this problem?

Thanks.

Best Regards,
Matthew Zenkar
Lumetrics, Inc.
0 Kudos
Message 1 of 4
(4,081 Views)
As a follow-up to my previous post, I have tried downloading and installing the patch for Measurement Studio 8 for Visual Studio 2005, however, after installing the patch, doing a "build - clean solution" and then a "build - build solution," I get the same error messages.

Thanks.

Best Regards,
Matthew Zenkar
Lumetrics, Inc.
0 Kudos
Message 2 of 4
(4,079 Views)
The patch installed updated versions of the NI windows forms assemblies . Make sure that you remove and re-add the NI controls from the toolbox to use these new assemblies. You should be able to browse to the C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Assemblies\Current folder and select the NI.UI.WindowsForms dll to add them to the toolbox.

The new assemblies are

NationalInstruments.UI.dll 8.0.11.237
NationalInstruments.UI.WindowsForms.dll 8.0.11.237


You will also need to re-add the assembly assembly references to your project.

Also make sure you updated the licx file with the updated assembly versions. These assemblies have newer versions and the licx file might not have updated correctly. Change the strings in the licx files to use the new version below. You will need to do this for all the controls referenced in the licx file.

NationalInstruments.UI.WindowsForms.ComplexGraph, NationalInstruments.UI.WindowsForms, Version=8.0.11.237, Culture=neutral, PublicKeyToken=4544464cdeaab541

I hope this helps.
Bilal Durrani
NI
0 Kudos
Message 3 of 4
(4,067 Views)
Thanks for the reply.

I did some further investigation before reading your reply and found that I needed to change the version number for the NI.UI.WindowsForms in the licx file to .237 from .236. This solved the problem of not being able to build. VS 2005 found the proper assemblies in the Windows GAC area and updated the references to point to those. However, I did delete them and re-added them from the NI "current" directory.

Everything appears to build properly now.

Thanks again.

Best Regards,
Matthew Zenkar
Lumetrics, Inc.
0 Kudos
Message 4 of 4
(4,058 Views)