Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

NationalInstrumnets.UI.Internal.WaveformPlotElement threw an exception

Solved!
Go to solution

Hi,

 I am trying to develop an application for a computer running windows 7 and the Atom processor.

When I try to run the application, I get the following error:

 

NationalInstrumnets.UI.Internal.WaveformPlotElement threw an exception

System.TypeInitializationException: the type initializer for 'NationalInstrumnets.UI.Internal.WaveformPlotElement threw an exception --> System.IO.FileNotFoundException:  Could not load file or assembly 'NationalInstruments.Common.Native.dll' or one of its dependencies.  The specified module could not be found.

 

I do see it in the c:\windows\Microsoft.Net\assembly\gac_32.

 

Please help.

 

Thank you.

0 Kudos
Message 1 of 36
(6,969 Views)

Hi Albert, 


Do you have 64-bit or 32-bit Windows? What version of Measurement Studio do you have? There have been many forum postings regarding similar errors that have been solved. Please review the following links and try the troubleshooting tips mentioned. 

http://forums.ni.com/t5/Measurement-Studio-for-NET/Could-not-load-file-or-assembly-NationalInstrumen...

http://forums.ni.com/t5/Measurement-Studio-for-NET/Could-not-load-file-or-assembly-NationalInstrumen...

http://forums.ni.com/t5/Measurement-Studio-for-NET/could-not-load-file-or-assembly-NationalInstrumen...

http://forums.ni.com/t5/Measurement-Studio-for-NET/Could-not-load-file-or-assembly-NationalInstrumen...

 

Regards,

Jackie

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 2 of 36
(6,956 Views)

Thank you Jackie,

 

Finally I got it going.

This is what I did:

a) added the following merge modules 'Microsoft_VC100_CRT_x86' and 'Microsoft_VC100_ATL_x86'

 

Now the program runs very well.

 

Thank you.

0 Kudos
Message 3 of 36
(6,937 Views)

Hi Albert, 


Thanks so much for posting back so others experiencing similar issues can learn from your solution. It is much appreciated! I'm very glad to hear your program is working and I hope you have a great day!

 

Regards,

Jackie

DAQ Product Marketing Engineer
National Instruments
0 Kudos
Message 4 of 36
(6,932 Views)

Hi, 

 

I've come across the same problem but even after including the merge modules, I get the same error.  Do you happen to have any other suggestions? 

0 Kudos
Message 5 of 36
(6,782 Views)

Hi,

This was a long time ago and I have not seen that error since.

Try running the vcredist_x86.exe (download it from microsoft website  

http://www.microsoft.com/en-us/download/details.aspx?id=5555

, and see if that helps.  

 

Please reply to the post if you find a solution.

 

Thank you and happy coding.

0 Kudos
Message 6 of 36
(6,779 Views)

I was expecting this to work, but it didn't.  I am installing (or trying to install) on a Win8 machine.  When I run  vcredist_x86.exe it tells me it can't install this because a newer version of the runtime already exists on that machine.  However, when the app tries to run, I get the error I mentioned previously, namely "NationalInstrumnets.UI.Internal.WaveformPlotElement threw an exception".    

 

This is the first time I've ever tried to install an app built using Measurement Studio on a Win 8 machine. 

 

Any thoughts? 

0 Kudos
Message 7 of 36
(6,770 Views)

Hey Steve,

 

One thing that has solved these kinds of issue in the past is to change the Target CPU settings so that the project targets to x86 (32-bit) rather than x64 (64-bit). Doing this will cause the program to run in 32-bit mode on a 64-bit machine, which sometimes works better, especially with regards to merge modules.

 

You can check this in the Project Properties in your project in Visual Studio -- there should be an Advanced Compile Options tab, and the target CPU will be listed in there. If it's not set to x86, I would suggest changing it to that and trying again.

 

Failing that, would it be possible to get a screenshot of what you see when you try to run the application?

0 Kudos
Message 8 of 36
(6,762 Views)

Hi Daniel, 

 

The project was set to build as "Any CPU".  I changed it to x86 but that didn't solve the problem. 

 

I'm attaching a Word .docx file with 3 screen shots - two error messages and one shot showing the configuration of the system.   On non-Win  8 machines, both 32bit and 64bit, we've installed in the build (built as AnyCPU) just fine.   Any sugestions would be greatly appreciated. 

 

Thanks, 

-Steve

 

 

0 Kudos
Message 9 of 36
(6,748 Views)

Steve,

 

I think you might be running into some of these issues a a result of the differing versions of the VC++ Runtime, as referenced by your first screenshot. I found this KnowledgeBase article that mentions a few Known Limitations at the bottom that might be some steps we can try: http://digital.ni.com/public.nsf/allkb/B041EF3CAF634FD98625770500509298

 

And to clarify, what version of Measurement Studio and Visual Studio are you using? And would it be possible to get the full text of that error message in your second screenshot?

 

I hope this helps, and if you can post back with the answers to those questions I'll continue to do research into the problem.

0 Kudos
Message 10 of 36
(6,743 Views)