03-30-2010 10:40 AM
Working application #1 is built with Common ver 8.1.20.168 and NI4882 ver 8.1.20.119
Working application #2 is built with Common ver 8.7.35.131 and VisaNS ver 8.9.35.108
When these are merged into a new application #3, apparently only one of the Common.dll files can be used...
If the older Common.dll is used, VisaNS routines fail because they require ver 8.7.35.131
If the newer Common.dll is used, the NI4882 routines fail because they require ver 8.1.20.168
What would be the best way to get the merged application working?
Solved! Go to Solution.
03-31-2010 04:39 PM
Hi garyhibb,
Unfortunately, you will have to use a single version of the common dll in your common application. However, you should be able to successfully run the application using the newer common.dll, since the dll is designed to be backwards compatible. What exactly are you seeing when you try to compile the merged application? If you are seeing a warning, it is safe to disregard due to policy file relinking, as mentioned in the following article:
If you are unable to compile at all, please provide a bit more detail on what errors you are getting, and we can work from there.
04-01-2010 08:58 AM
The errors that occur when compiling the application are shown below:
With Common version 8.7.35.131, NI4882 version 8.1.20.119 and VisaNS version 8.9.35.108:
Error 1 The type 'NationalInstruments.ISupportSynchronizationContext' is defined in an assembly that is not referenced.
You must add a reference to assembly 'NationalInstruments.Common, Version=8.1.20.168, Culture=neutral, PublicKeyToken=4544464cdeaab541'.
C:\CSharp_test\GCN\GCN\GPIB_Instrument.cs 15 50 GCN
Error 2 The type 'NationalInstruments.ISynchronizeCallbacks' is defined in an assembly that is not referenced.
You must add a reference to assembly 'NationalInstruments.Common, Version=8.1.20.168, Culture=neutral, PublicKeyToken=4544464cdeaab541'.
C:\CSharp_test\GCN\GCN\GPIB_Instrument.cs 15 50 GCN
With Common changed to version 8.1.20.168:
Error 1 The type 'NationalInstruments.ISupportSynchronizationContext' is defined in an assembly that is not referenced.
You must add a reference to assembly 'NationalInstruments.Common, Version=8.7.35.131, Culture=neutral, PublicKeyToken=18cbae0f9955702a'.
C:\CSharp_test\GCN\GCN\Form1.cs 29 63 GCN
Error 2 The type 'NationalInstruments.ISynchronizeCallbacks' is defined in an assembly that is not referenced.
You must add a reference to assembly 'NationalInstruments.Common, Version=8.7.35.131, Culture=neutral, PublicKeyToken=18cbae0f9955702a'.
C:\CSharp_test\GCN\GCN\Form1.cs 29 63 GCN
04-02-2010 01:24 PM
Hi Gary,
Thanks for the additional information! It looks like the problem here is that the 4882 version you are referencing depends on the .NET 2.0 version of the common assembly while the VISA version is referencing the 3.5 version. Tofix this, you will need to either reference a newer version of the 488.2 assembly (recommended) or an older version of VISA assembly. If you install the latest version of NI-488.2, you will be able to reference the newer assembly, allowing you to successfully run your application with the newer common assembly.