Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Internally referenced assembly could not be found

I'm trying to check code into source control that uses NationalInstruments.NI4882.dll v8.9.35.104.

 

Unfortunately, this assembly apparently contains an internal reference to NationalInstruments.Common version 8.7.35.131 which I don't have.  Because of this, my code won't pass code validation and I can't check it in.

 

Furthermore, I can't add a reference to NationalInstruments.Common version 8.7.35.131 because that causes a conflict with NationalInstruments.Common version 8.9.35.302 which I DO have.

 

My questions

1) Why does NationalInstruments.Ni4882.dll contain a reference to an old version of NationalInstruments.Common?  Is this an oversight?  Is my code validation wrong?

 

2) How can I fix this error short of disabling code validation

 

Thank You,

Peter Baughman

0 Kudos
Message 1 of 4
(3,661 Views)

Hi Peter,

 

The reason why NationalInstruments.NI4882.dll is pointing to 8.7.35.131 is because the assembly was built against this version of the assembly and is the intended behavior. National Instruments assemblies use a publisher policy file to reroute requests for the older version to the newer version of Common. More information can be found in the Measurement Studio Help by searching "Common .NET Library" and then clicking on the referral link labeled "Measurement Studio .NET Class Library Versioning for Development and Deployment".

 

Essentially, the referencing to the older version of common is correct since the program runs correctly, but if you can point to the publisher policy files in the GAC then you could fix the issue with your code validation.

 

Hope this helps!

 

Chris T.
0 Kudos
Message 2 of 4
(3,636 Views)

Sorry for the delay on this question, but I had to put this project aside for a few weeks:

 

 

I've looked in the MSIL GAC and the only things I can find that are National Instruments related are:

 

NationalInstruments.Common.dll

NationalInstruments.NI4882.dll

NationalInstruments.LabVIEW.Interop.dll

policy.8.5.NationalInstruments.Common.dll

policy.8.6. . .

policy.8.7. . .

policy.8.9. . .

 

I need NationalInstruments.NI4882.dll referenced to use the "Device" object

I need NationalInstruments.Common referenced to use NationalInstruements.ISupportSynchronizationContext

At this point, I can build my project, but Visual Studio's analysis tool still dies while trying to resolve the reference to NationalInstruments.Common Version 8.7.35.131 even if I add references to all of the other National Instruments related things in the MSIL GAC

 

Am I missing something here?  Is there anything else I should be trying?

0 Kudos
Message 3 of 4
(3,545 Views)

Hi pbaughman,

 

This is a feature of Visual Studio, and they would be better to assist you on the matter. However, I found this link that perhaps might help?

 

http://msdn.microsoft.com/en-us/library/dd264893.aspx (Mainly CA1016)

 

Hope this helps!

Chris T.
0 Kudos
Message 4 of 4
(3,516 Views)