From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Error - "Type initializer for 'NationalInstruments.Tdms.Internal.e' threw an exception"

Hello all,

 

I've been fighting with Measurement Studio to deploy to a secondary laptop.  It's a simple datalogging application, written in C#, that takes in data from an NI DAQ box and graphs it and logs it to a TDMS file.

 

It's working great on my development computer (measurement studio installed), but when I try to run it on my other laptop (measurement studio not installed), it spits out this exception:

System.TypeInitializationException: The type initializer for 'NationalInstruments.Tdms.Internal.e' threw an exception. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'TDMS_GetLibraryVersion' in DLL 'cvitdms.dll'.
at NationalInstruments.Tdms.Internal.e.TDMS_GetLibraryVersion(UInt32& A_0, UInt32& A_1, UInt32& A_2, UInt32& A_3)
at NationalInstruments.Tdms.Internal.e.a()
at NationalInstruments.Tdms.Internal.e..cctor()
--- End of inner exception stack trace ---
at NationalInstruments.Tdms.Internal.e.TDMS_CreateFileEx(String A_0, TdmsFileFormat A_1, TdmsByteOrder A_2, UInt32 A_3, String A_4, String A_5, String A_6, String A_7, i& A_8)
at NationalInstruments.Tdms.Internal.g.a(String A_0, TdmsFileOptions A_1, String A_2, String A_3, String A_4, String A_5)
at NationalInstruments.Tdms.TdmsFile.a(TdmsFileOptions A_0)
at NationalInstruments.Tdms.TdmsFile..ctor(String path, TdmsFileOptions fileOptions)
at CA02_DAQ_Program.Form1..ctor() in t:\JKelly\CA02 DAQ\CA02 DAQ Program\CA02 DAQ Program\Form1.cs:line 78
at CA02_DAQ_Program.Program.Main() in t:\JKelly\CA02 DAQ\CA02 DAQ Program\CA02 DAQ Program\Program.cs:line 23

I'm creating a few AIVoltageTasks inside the code as well.  When I comment out all of the TDMS code (creating the file, writing to it, etc.), everything works great.  I've tried using the Measurement Studio Installer Builder, but that didn't seem to work either.  I've looked into the merge modules needed, and I tried copying them into the client's laptop's directories, but that didn't work either.

 

What is the proper way to deploy a Measurement Studio application to a laptop that doesn't have it installed?

 

Thanks,

Joe

 

0 Kudos
Message 1 of 6
(3,592 Views)

Hi Joe,

 

When you use the installer builder, do the same errors occur or are they different?

 

An additional installer builder we could try is the Windows Installer XML (WIX) toolset. 

 

Deploying Measurement Studio Applications with WiX: http://digital.ni.com/public.nsf/allkb/764B727C9BD2C4C686257C970053D059 

 

Does this produce any different behavior? 

 

Thanks,

 

ShaneK

Applications Engineering

0 Kudos
Message 2 of 6
(3,558 Views)

Hello Shane,

 

Sorry for the (very) long response time.  I haven't been able to try out WiX yet.  I've heard it has a pretty steep learning curve.  I'm trying to figure out how to use Measurement Studio with all of the merge modules and such.

 

I'll try to make some time next week to work on the problem, and if I need any more help, I'll post here.

 

Thanks,

Joe

0 Kudos
Message 3 of 6
(3,450 Views)

Hello Joe,

 

I am trying to log the data in the TDMS file using Measurement Studio and facing the same problem you posted while creating the file on deployment Server whereas it is working fine on my development machine. Can you please share what needs to be taken care on the deployment server to create the TDMS file?

Urgent help needed.

 

Thank You.

0 Kudos
Message 4 of 6
(2,951 Views)

Hi PANDYA23,

 

There are multiple ways to create your distributable applications in Visual Studio using Measurement Studio, however, I recommend you to look at this help documentation that details the XCOPY method plus it details the necessary files according to the type of libraries that you use.

 

Hope that you can find this useful! Let us know if further assistance is required!

Regards,

Sil.VI
0 Kudos
Message 5 of 6
(2,919 Views)

Hello Sil.VI,

 

Thank you very much for your help.

I am able to resolve the problem by creating an Installer using Measurement Studio Installer Builder.

We are facing problem due to unavailability of NI Drivers and components on target machine so we used  Measurement Studio Installer Builder to create a Installer package and release as in install it on the deployment server, Measurement Studio Installer Builder automatically includes NI all required Drivers and components in the Installer during installer builder and it works.

 

Thank You:)

0 Kudos
Message 6 of 6
(2,912 Views)