Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to Use NationalInstruments.Tdms Assembly

Hi,

 

I have a Visual Studio 2013 c# project in which I want to use the NationalInstruments.Tdms namespace to write data to a file.

 

I was unable to add the assembly immediately through the Reference Manager dilaog because after searching the NationalInstruments.Tdms assembly was not listed.

 

So, I did a search for NationalInstruments.Tdms.dll on my system and found:

 

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\NationalInstruments.Tdms\v4.0_13.0.45.242__4febd62461bf11a4\NationalInstruments.Tdms.dll

 

...so I added that and I was able to start writing code against that namespace. However, when I came to running it I was told:

 

A first chance exception of type 'System.ComponentModel.LicenseException' occurred in NationalInstruments.Common.dll

Additional information: NationalInstruments.Tdms.TdmsLicenser is unlicensed.

So, I added a line to my project's licenses.licx file so that it looked like this:

 

NationalInstruments.Tdms.TdmsLicenser, NationalInstruments.Tdms, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4

However, now when I try and run my project it doesn't even start. I get the following warning dialog:

 

Assert Failure.png

 

Can anyone give me any pointers as to why this is not working, please?

0 Kudos
Message 1 of 4
(5,133 Views)

Isn't the TDMS .NET assembly a part of Measurement Studio 2013?

 

If so, Measurement Studio 2013 does not support Visual Studio 2013. http://www.ni.com/mstudio/whatsnew/

0 Kudos
Message 2 of 4
(5,129 Views)

So far everything else I have used from Measurement Studio (device control, task definition etc.) works fine, it just seems to be that the VS integration doesn't work.

 

So I'm hoping there is a workaround to enable me to make use of the included asseblies even if I have to set everything up manually. 

0 Kudos
Message 3 of 4
(5,109 Views)
For using Microsoft Visual Studio 2013 with Measurement Studio 2013, see: http://digital.ni.com/public.nsf/allkb/C51E3B38578FAD2786257C070069F386

You should reference assemblies in the program files <Measurement Studio>\dotNET\Assemblies\Current directory instead of directly from the GAC, when referencing them manually.

This LC.exe assert is something we've seen in the past on localized versions of Windows (Swedish and German). The work around is to modify your UI (remove and add a licensed UI component) and rebuild your solution. The error is happening in the Microsoft license compiler. Let me know whether you are able to get around this using the work around.

Thanks!
Daniel Dorroh
National Instruments
0 Kudos
Message 4 of 4
(5,046 Views)