Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

System.IO.fileloadException: Could not load file or assembly NationalInstruments.Common, Version=13.0.40.188 The located assembly's manifest definition does not match the assembly reference.

I found that the Waveform Plot is still trying to access the old version 13.0.40.188. After doing everything you suggested. 

0 Kudos
Message 11 of 37
(5,813 Views)

On the target machine, do you see multiple folders in: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\NationalInstruments.Common?

 

The Measurement Studio 2013 Release Notes says:

NationalInstruments.Common.dll uses a publisher policy file to
redirect applications to always use the newest version of NationalInstruments.
Common.dll installed on the system, for each version of the .NET Framework.
However, prior versions of NationalInstruments.Common.dll remain in the
GAC after you install a newer version of Measurement Studio. National Instruments
exerts extra effort to ensure that NationalInstruments.Common.dll is
backward-compatible so that applications built against prior versions of
Measurement Studio continue to work as expected.

 

So the application should by default be looking for the latest version of the NationalInstruments.Common.dll for that version of the .NET Framework. What version of the .NET Framework is your project using? What version(s) are installed on the computer?  When you upgraded Measurement Studio, did you also upgrade Visual Studio? Did you upgrade the .NET Framework of the project?

 

Another idea if deploying your application: this forum post (message 3) discusses making sure the dependencies of the project are linked to the correct merge module. Step 6 of Deploying Measurement Studio Applications discusses how to check the dependencies. Also, the list of merge modules is here: Measurement Studio .NET Merge Modules. The Measurement Studio merge module for the NationalInstruments.Common is MStudioCommon.2010.msm, and the Visual Studio merge module is Microsoft_VC100_CRT_x86.msm (32-bit).

 

Hope this helps. More details about the upgrade process may help!

Taylor B.
National Instruments
0 Kudos
Message 12 of 37
(5,802 Views)

I have the 188 problem as well, but I am deployed where no installs are allowed. The .NET framework is current and up to date, but I cannot install anything into the GAC (or use Setup programs of any kind).

 

I am seeing the 188 problem when trying to use only the NationalInstruments.Tdms.dll assembly.

 

C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.Tdms.dll
NationalInstruments.Tdms, Version=13.0.45.242, Culture=neutral, PublicKeyToken=4febd62461bf11a4
C:\ProgramData\Riddler\Riddler Server\Projects\Temp\FFA40C23-9EED-4E09-B76F-049BFB000FAB\13.0.0.242\VS2012.NationalInstruments.Tdms.dll\Out\Assemblies\NationalInstruments.Tdms.pdb

 

 

 

0 Kudos
Message 13 of 37
(5,587 Views)

More information about your application and deployment process is necessary to help with this error:

  1. What version of Visual Studio are you using?
  2. What version of Measurement Studio are you using?
  3. Do you have multiple versions of either product installed?
  4. Are you using any hardware drivers (NI-DAQmx, NI-VISA, etc.)?
  5. What are you using to deploy your application (WiX, XCOPY, etc.)?
  6. For deployment, since you say you cannot install anything, how are you moving the proper DLLs and merge modules to the target machine?
  7. Are you doing anything to register the assemblies in the GAC?
  8. On the development and target machines, what do you see in: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\NationalInstruments.Common?

Also, there are a few other forums discussing this error and potential solutions. Please take a look at these:

  1. Missing assembly 'NationalInstruments.Common, Version=13.0.40.188'
  2. Still required to install NationalInstruments.Common 13.0.40.190 to GAC? 
  3. Re: Deployment of Web Application Reference Proble

 

Taylor B.
National Instruments
0 Kudos
Message 14 of 37
(5,561 Views)

1. Visual Studio 2013 Update 4

2. Measurement Studio 2013

3. Only Measurement Studio 2013

4. My application only uses the TDMS assembly, nothing else (no NI controls, no drivers, etc). 

5. WinRar (or Xcopy, whatever you want to say, just copying files to customer's machine(s) -- no setup programs or GAC installs allowed).

6. I know what files are necessary to deploy a TDMS application:

 

copy "C:\Program Files (x86)\National Instruments\Shared\Mesa\mesa.dll" .
copy "C:\Program Files (x86)\National Instruments\Shared\TDMS\tdms.dll" .
copy "C:\Windows\System32\cvitdms.dll" .
copy "C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.Common.Native.dll" .
copy "C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.NiLmClientDLL.dll" .
copy "C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.MStudioCLM.dll" .
copy "C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.Common.dll" .
copy "C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies\Current\NationalInstruments.Tdms.dll" .

 

7. No, no administrator access.

8. =>

 

Development Machine GAC

12/29/2013  03:31 AM    <DIR>          v4.0_13.0.40.190__dc6ad606294fc298
08/16/2014  09:07 PM    <DIR>          v4.0_13.5.40.138__dc6ad606294fc298
04/03/2014  12:50 PM    <DIR>          v4.0_9.0.40.362__dc6ad606294fc298

 

Target Machine GAC (should be nothing here but this machine previously had LabVIEW 2012 installed)

11/15/2014  02:44 PM    <DIR>          v4.0_13.0.40.190__dc6ad606294fc298

 

 

0 Kudos
Message 15 of 37
(5,535 Views)

Here is an image of process hacker, displaying the attached assemblies during runtime on the development machine. NationalInstruments.Common.dll isn't the version that's been a problem (188) nor is it a version that's in the primary folder (13.0.40.190). Although it is a version that's in the installed directory:

 

C:\Program Files (x86)\National Instruments\MeasurementStudioVS2012\DotNET\Assemblies

 

08/16/2014  09:08 PM    <DIR>          13.0.40.190
08/16/2014  09:08 PM    <DIR>          13.0.45.159
08/16/2014  09:09 PM    <DIR>          13.0.45.167
08/16/2014  02:31 PM    <DIR>          13.0.45.242
08/18/2014  09:16 AM    <DIR>          9.9.45.39
08/18/2014  09:16 AM    <DIR>          Current

 

 

process-hacker-ni-common-problem.png

0 Kudos
Message 16 of 37
(5,519 Views)

Chris,

 

From what I can see it looks okay, but have you verified that you are including the correct versions of the assemblies when you copy them over?

 

You can also use Fusion Logs to help debug the issue. This application can help narrow down the root cause of this kind of issue.

Steven Gloor
Staff Customer Engineer - CTA, CLD
0 Kudos
Message 17 of 37
(5,498 Views)

App.Config - I set a binding redirect, and a policy ignore:

 

<bindingRedirect oldVersion="13.0.40.188" newVersion="13.0.40.190"/>

<publisherPolicy apply="no" />

 

The only thing this seems to do, is to change the error dialog to this:

 

---------------------------
TDMS Exception
---------------------------
The library failed to load.
---------------------------
OK
---------------------------

 

Fusion log attached - note that it appears successful.. the exception above shows clearly that is not the case.

 

 

0 Kudos
Message 18 of 37
(5,487 Views)

I installed DaqMX support on the machine in question -- as expected, my application works just fine. For some reason, the NationalInstruments.Common is NOT loading the 188 assembly... but the more current 13.0.40.190... the timestamp is different than the Measurement Studio version... I think the signature of the Measurement Studio version is different causing the problem.

 

proc-explorer-success.png

0 Kudos
Message 19 of 37
(5,478 Views)

The log looks like it tries to load NationalInstruments.Common, Version=13.0.40.188 and then loads Version=13.0.40.190 from the GAC. Based on various posts from stackoverflow and MSDN (listed at the bottom of the post), I think the issue is that the loader is looking for one version (188) of the assembly, but loads another version (190) that doesn't match the requested verion.

According to Step 4 of the Measurement Studio 2012 Manual article Measurement Studio .NET XCOPY Deployment Files, you need to update the web.config file  to redirect applications to always use the newest version of NationalInstruments.Common.dll (190):

 

If you do not create an installer, with Web Forms, you also can add the following example snippet to the web.config file; however, you need to update the versions listed in the example. Run a tool, such as Ildasm.exe, on a dependent assembly, such as NationalInstruments.UI or NationalInstruments.UI.WebForms, to determine the older version of NationalInstruments.Common that should be redirected.


configuration
runtime
assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
dependentAssembly
assemblyIdentity name="NationalInstruments.Common"
publicKeyToken="18cbae0f9955702a"
culture="neutral"/
bindingRedirect oldVersion="9.1.40.145"
newVersion="9.1.40.149"/
/dependentAssembly
/assemblyBinding
/runtime
/configuration

 

Just as FYI, here are the posts I looked at from other sites about this error:

  1. The located assembly's manifest definition does not match the assembly reference
  2. The located assembly's manifest definition with name xxx.dll does not match the assembly reference
  3. Getting error: "The located assembly's manifest definition does not match the assembly reference"
Taylor B.
National Instruments
0 Kudos
Message 20 of 37
(5,477 Views)