Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Could not load "NationalInstruments.Common.Native.dll"

Hi,

 

I am developing an application on Visual Studio 2010 using C#, .NET 4.0 and Measurement Studio 2010. 

I have been trying to deploy/run my application on a client computer but the application keeps crashing.Using DebugView and try catch blocks, I narrowed the issue down to "this.waveformPlot1 = new NationalInstruments.UI.WaveformPlot();" in InitializeComponent();

 

debugViewScreen.jpg

Shown above, is each property of the exception displayed when I have a try catch around the InitializeComponent(); 

 

It tells me that it could not load the assembly "NationalInstruments.Common.Native.dll or its dependencies". 

 

I also used Fuslog.exe to check which assemblies are being loaded. In there, for each of the NI assembly logs, it says "GAC lookup unsuccessful" but it ends up downloading it and loading them succesfully. Something like this screenshot shows. 

 

I tried using ClickOnce and Windows Installer following the directions in the 'Measurement Studio Help' page.

 

The dependencies screen looks like the screenshot below:

DependenciesScreen.jpg

I checked the installation folder after I installed the application on the client computer and it did not include the common.dll files.

 

FolderScreen.jpg

 

Using Gacutil.exe to add the dll to the GAC didn't help either. I added common.native.dll to the GAC and I still get the same issue. 

 

Any help regarding how to solve this issue would be deeply appreciated. Thank you

 

0 Kudos
Message 1 of 4
(5,861 Views)

This is a bit confusing because it looks like your exception log and fusion log are contradicting each other. Looking at the timestamps however tells me that these might have been from different times you ran the application. The fusion log shows it successfully loading the assembly (although not from the GAC) which is what we want. Could you post an exception log and fusion log from the same run of the application? When you added the assembly to the GAC using the utility, where did you get the assembly from? Was it installed in another location by your installer? What happens if you place it in the same directory as the other assemblies?

 

I recently worked with another user who was having a very similar issue in this thread. Are you also using Any CPU configuration? Do you receive warnings when compiling?

National Instruments
0 Kudos
Message 2 of 4
(5,834 Views)

I'm sorry about the confusion. Both those screenshots were taken at different, I think. But, that's what it looks like even when I run the application at the same time. And, the exception log and fusion log contradicting each other was what basically baffled me. I never figured out why that is showing up the way it is. 

When I added the assembly to the GAC, I copied the assembly from my dev machine and did it on the client machine using the gacutility.exe

 

I just spoke to someone from NI and he helped me solve the issue I was having. I had noticed that checking the module dependencies of mstudiocommon.2010.msm showed that it was looking for the vs100_crt_x86.msm file but the installer had detected and added a vs90_crt_x86.msm. Right-clicking the installer project and adding the VS100 .msm file manually fixed the issue I was having. 

 

ModuleDependencies.jpg

 

Although, I didn't understand why Visual Studio was detecting VS90 instead of VS100, I am happy that I finally fixed this problem. I still have an open ticket with the Microsoft tech guys so I'll see if they can tell me why. 

 

Thanks NI forum and NI support. 

 

 

0 Kudos
Message 3 of 4
(5,823 Views)

I had the same problem with the installation of setup project on a target machine (WinXP SP3). On execution time the windows error subscriber window appeared and the reason for the exception was an fileioexception. The causing file/assembly was: NationalInstruments.UI.dll

Adding the above merge modules VC100_CRT and VC100_ATL also helped me to solve the problem; coz the wrong modules were referenced during my development session.

 

This smells like an already "burned" Bug! 😉 

0 Kudos
Message 4 of 4
(5,790 Views)