Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

unable to load NationalInstruments.Common.Native assembly

I have build an VS2008 .net application using MeasurmentStudio2010.

It works fine on XP and Win7 32 bits but not on Win7 64

I got the "Unable to load NationalInstruments.Common.Native assemby" version=9.0.35.362 error when trying:

       new NationalInstruments.UI.WaveformPlot()

 

I have read many posts and try what was suggested but without success.

For deployement I use the VS2008 setup project and found the following dependencies:

comcat.msm

comctl32.msm

mfc42.msm

microsoft_vc90_atl_x86.msm

microsoft_vc90_crt_x86.msm

mkl.msm

mstudiocommon.2008.msm

mstudiodaqmw.2008.msm

msstudiomaxconfiguration.2008.msm

mstudiostandardanalysis.2008.msm

mstudioui.2008.msm

mstudiouidesign.2008.msm

mstudiouiwinforms.2008.msm

msvc60.msm

msvcrt.msm

nianlys.msm

nimesadll.msm

nimetautils.msm

oleaut32.msm

 

I have added these 2:

CWUI_OCX.msm

MStudioUtils.msm

 

I have a app.config to redirect NationalInstruments.Common assembly from

8.7.35.131 to 9.0.35.362 and avoid a compile warning.

 

I have noticed this:

  • When using this setup on any PC, I don't find the measurement studio for VS2008 dlls
  • When setting the "TargetPlatform" to x64 instead of x86, the error message disappear but I not able to run x86 dependent dlls.

 

Thanks for any help

 

R

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

R,

 

Many of the merge modules have 64-bit versions. Please take a look at the Measurement Studio Help topic: NI Measurement Studio >> Deploying Measurement Studio Applications >> Measurement Studio Merge Module and Deployment Files >> Measurement Studio .NET Merge Modules. This table lists what merge modules you need for x86 and x64 for each component.

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

Thanks for the reply,

 

Note that I am trying to run the 32bit version of my exe on a Win 7 64bit. If I try to add 64 versions of merge modules when trying the "x86" generation It won't work(cannot mix 32bit version with 64bit version)

Looking at the merge modules, all needed ones seem to be there. Note also that the setup deployement seems to correctly found dependencies(either for "x86" than for "x64" targetPlatform)

When I remove all measurment studio objects from my program , it works.

 

 

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

x86 is the correct Platform Target for a 32-bit application using NI assemblies. You should not have to redirect to the latest version of common in app.congig. NationalInstruments.Common has a policy file that allows for version compatibility (the only National Instruments Assembly that does this). What version of the assembly do you have on the target system after installing with the setup project? What version of the mstudiocommon.2008.msm do you have in your setup project?

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

Ok, I got it. The code generation was targetting "AnyCPU" and it must be "x86".

 

Watever target platform was used in the setup, the program was always  starting as a 64 bit program.

 

Now Everything is x86 and it works 

 

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