Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Exception. The located assembly'a manifest definition does not match the assembly reference

We have an application developed using Visual Studio 2008 (Visual C#.NET) and running on a Windows 7 64 bit PC.

 

We have added the following DLLS from Measurement Studio 2008 to our project;

 

NationalInstruments.Common.dll                          (version 13.0.35.190)

NationalInstruments.Vision.Common.dll                (version 13.0.35.101)

NationalInstruments.Vision.Acquisition.Imaq.dll     (version 4.60.35.49153)

 

 

The project compiles OK.

 

However when we run the program the error shown at the bottom of this message is displayed.

 

For some reason the software is looking for version 8.7.20.131 of NationalInstruments.Common.dll. Im not sure but but this could be due to us using previous versions of the DLLs a few years ago.

 

Ive tried cleaning the project and also removing the DLLs and re-adding them to the project without success. Ive also tried the Measurement Studio dlls.

 

Can you please explain how I fix this problem?

 

Thanks very much

 

Doug

 

 

 

-------------------------------

FileLoad Exception was unhandled 

 

Could not load file or assembly 'NationalInstruments.Common, Version=8.7.20.131, Culture=neutral, PublicKeyToken=4544464cdeaab541' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

0 Kudos
Message 1 of 5
(8,991 Views)

Not sure if the following is related;

 

I tried to make the LowLevelGrab project in the Samples programs into an "any CPU" project. This is because we need the project to run in a 64 bit project.

 

However I got a "badImageFormatException was unhandled" error. Could not load file or assembly 'NationalInstruments.Common, version= 13.0.20.101.....An attempt was made to load a program with an incorrect format.

 

It looks like perhpas I need 64-bit versions of the DLLs but the only one I can find is NationalInstruments.Common.Native.dll in a the DotNet 64-bit directory. I added this DLL to the project but it made no difference.

 

Any ideas how I can get to compile this sample in a 64-bit project. I am not sure whether this problem is related to my original question.

 

best regards

 

0 Kudos
Message 2 of 5
(8,913 Views)

Hi

 

Can someone confirm if this problem is solvable? Im under pressure and Ive no idea how to fix this. Ive tried searching and the discussions dont fill me with confidence quite frankly.

 

If its not fixable I need to try something else.

 

TIA

0 Kudos
Message 3 of 5
(8,803 Views)

Hi Doug,

 

The first error you've detailed is caused by part of your project referencing an old version of the assembly, this could be because you have used older versions in the past. When your NationalInstruments.Common was updated, for some reason it might not have updated in Measurement Studio, a repair of Measurement Studio should fix this, otherwise you can use binding redirects to point calls to the newer version.

These issues are discussed in a KB article here.

 

The reason you're having trouble building the LowLevelGrab example may be because there is currently no 64bit Vision support for Measurement Studio.

More information on 64 bit support in Measurement Studio can be found here.

 

Let me know if this helps.

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

Thanks for the reply Adam. I suspect now both questions are probably due to the 64-bit issue (I uninstalled ALL my NI software from the Control Panel then reinstalled the software from our latest CD) and there was absolutely no difference.

 

Since NI-IMAQ.NET is surprisingly not supported for 64-bit Windows then I will have to try and use the C++ sample code.

 

 

0 Kudos
Message 5 of 5
(8,758 Views)