Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

TypeInitilizationException when Using NationalInstruments.Analysis

Hi everyone I could use some help

 

I am getting the following exception when I run my program

 

Exception thrown: 'System.TypeInitializationException' in SerialDacq.exe

Additional information: The type initializer for 'NationalInstruments.Analysis.Dsp.SymmetricWindow' threw an exception.

 

I am currently using the evaluation version of Measurement Studio and can't figure out where to go from here

 

Help would be appreciated Thanks!

0 Kudos
Message 1 of 9
(4,202 Views)

 

Hey there,

 

Usually this is thrown because you are missing the DLL associated with the Analysis Class. You can read more here. Does this sound like it can solve your problem?

 

System.TypeInitializationException Error When Loading A Deployed Measurement Studio Analysis Applica...

Mathew H.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 9
(4,169 Views)

I have the DLL that is associated with the Analysis Class and it is still throwing the error.

 

Any idea of where to go from here?

0 Kudos
Message 3 of 9
(4,144 Views)

Has this ever worked before or is did this just start happening when using anything from this class?

 

I would try repairing Measurement Studio itself through Programs and Features in an effort to restore the path in case the DLL was moved or the reference to it was changed.

 

 

Mathew H.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 9
(4,114 Views)

This just started happening when I added code that uses the Analysis Class.

 

I am going to try repairing the installation and will post the results here.

0 Kudos
Message 5 of 9
(4,108 Views)

I have repaired the installation and I am still getting the same error.

 

 

 

0 Kudos
Message 6 of 9
(4,104 Views)

If you can, I would try force reinstalling. The original KB linked above mentions that this shouldn't be happening on a development machine and to reinstall if it is, and I know that you repairing the installation, but force reinstalling can actually touch more files and paths than a traditional repair or uninstall/install.

 

Force Reinstall NI Software from the Command Prompt in Windows

Mathew H.
Applications Engineer
National Instruments
0 Kudos
Message 7 of 9
(4,093 Views)

Sorry it's been a couple days since I checked this. I have tried everything you have suggested and It still does not work.

 

I am using Visual Studio 2015 and the evaluation version of Measurement Studio

0 Kudos
Message 8 of 9
(4,047 Views)

You're using Measurement Studio 2015 with Visual Studio 2015? That would probably be why. Measurement Studio 2015 is made to be used with Visual Studio 2010, 2012, or 2013. It's confusing, I know, but that's just the compatibility of the software. Can you get Visual Studio 2013 and try this program out?

 

Compatible Measurement Studio and Visual Studio Versions

Mathew H.
Applications Engineer
National Instruments
0 Kudos
Message 9 of 9
(4,035 Views)