05-26-2011 10:57 AM
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.
Solved! Go to Solution.
05-27-2011 02:00 PM
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.
Regards,
Jackie
06-01-2011 06:56 AM
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.
06-02-2011 09:31 AM
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
01-04-2013 04:01 PM
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?
01-04-2013 04:17 PM
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.
01-07-2013 08:29 AM
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?
01-07-2013 12:28 PM
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?
01-08-2013 08:52 AM
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
01-08-2013 10:56 AM
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.