05-21-2015 08:39 AM - edited 05-21-2015 08:51 AM
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:
Can anyone give me any pointers as to why this is not working, please?
05-21-2015
09:56 AM
- last edited on
06-06-2026
06:31 PM
by
Content Cleaner
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/
05-22-2015 04:32 AM
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.
05-24-2015
12:51 PM
- last edited on
06-06-2026
06:31 PM
by
Content Cleaner
For using Microsoft Visual Studio 2013 with Measurement Studio 2013, see: https://www.ni.com/en/support/documentation/supplemental/18/using-measurement-studio-2013-with-micro...
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!