Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Error: NationalInstruments.DAQmx.dll Ver=9.1.35.15 is referencing NationalInstruments.Common.dll Ver=8.9.35.302, which I don't have

Solved!
Go to solution

Hello,

 

I posted a similar issue in a different thread, but under a different title.  I'm afraid the word "FxCop" threw some people off (and since been closed), so I apologize for starting a new thread.  Nonetheless, I'm still running into the same issue after I removed all NI software via MSIBlast and Add/Remove Programs, and freshly installed Measurement Studio 2010 with no errors. 

 

Anyway, I'm basically using FxCop to verify .Net coding standards and I run into an issue when I run the tool on my compiled dll, which is referencing NI dll's (DAQmx, Common, and Analysis.Enterprise).  Please check the attached .jpg of the popup box I'm getting.  It pretty much says that DAQmx is looking for Common version 8.9.35.302 which I don't think is on my machine.  I did a file search and didn't see either the Common or Common.Native versions that is being called out.  I have Common.dll version 9.0.35.362 installed.  However, when I use the gacutil, it spits out something regarding NationalInstruments.Common.Native, Version=8.9.35.302.  Please check the second attachment for the gacutil output shrunken down to list only NI items.  Should I simply uninstall this, or is my problem something else, ie. I really do need version Common.dll version 8.9.35.302?

 

Thanks for any help!

 

-J

Download All
0 Kudos
Message 1 of 5
(4,611 Views)
Solution
Accepted by topic author jongj

Hello -

 

I think the issue may just be that you haven't looked in the right portion of the GAC yet.  The common assemblies actually target AnyCPU instead of x86, so you have to visit the MSIL portsion of the GAC.  You should be able to run the following command from a command prompt to get the common assembly out of the GAC so that FxCop can load it:

 

copy c:\Windows\assembly\GAC_MSIL\NationalInstruments.Common\8.9.35.302__18cbae0f9955702a\NationalInstruments.Common.dll <location you want to copy the assembly>

 

Let me know if you're still unable to locate the assembly -

 

NickB

National Instruments

Message 2 of 5
(4,602 Views)

Hey NickB,

 

That seemed to have done the trick!  I was wondering if you know why I had to do this?  Also, it seems like the only reason I needed the older dll is for FxCop to analyze, so is there a different driver set I should be working with since I don't want to keep track of two Common.dll's?  I think my current drivers came from whatever was provided with the Measurement Studio 2010 s/w, so I assume they should be ok. 

 

Anyway, thanks for the help!

 

-J

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

Hello -

 

Actually, things are all working as intended.  Measurement Studio and DAQmx don't have exactly the same development cycle, and for this reason, they will depend on different versions of NationalInstruments.Common.  The way that we handle this at runtime is by ensuring backwards compatibility and using publisher policy files to redirect requests for all versions of Common to the latest version that's been installed.

 

Also, I just ran across an option that I missed last night.  In FxCop, you can got to Project»Options»Spelling & Analysis and select Seach Global Assembly Cache for missing references to keep you from having to copy files out of the GAC.

 

Hope that helps -

 

NickB

National Instruments

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

This was really helpful.  I didn't even check to see if there was such an option in FxCop.  Everything seems to be working peachy now.  Thanks for the help!  Smiley Happy

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