Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

C# 2010, wrong version of NationalInstruments.common.dll

 

I am trying a first C# express program using NI488.2 version 2.8.1 which I just installed.

 

My application gives a compile error

Error1The 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'.E:\src\1 -

C++ C# Express\Work\StevesTestApp\StevesTestApp\Form1.cs3524StevesTestApp

 

It looks like it wants NationalInstruments.Common ver 8.7.35.131.

The version of NationalInstruments.NI4882 is 8.9.35.104

The version of NationalInstruments.Common.Native is 8.9.35.302

 

Here is all I have avaliable for the common dll after the install:

8.9.20.302

8.9.35.302

 

The only Nationalinstruments.NI488.dll version I have seems to be 8.9.35.104 looking in C:\Program Files\National Instruments\MeasurementStudioVS2008.

 

Where do I get the correct assembly or cause it to like the versions I have?

thanks.

 




0 Kudos
Message 1 of 2
(4,002 Views)

Well I should have searched a little more before asking.

 

This thread suggests the solution:

http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/NationalInstruments-Common-dll-8-7-35-131-is-...

 

I reinstalled NI488.2 ver 2.8.1 and carefully selected support for .NET 2010 version 4. I installed the patch mentioned in the thread above. Then I removed all the NI referecnces from my project and added them back in from C:\Program Files\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies.

 

The final change was in Visual Studio I needed to change:

Project>App Properties>Application>Target framework to ".Net Framework 4" from the default ".NET Framework 4 Client Profile". I'm not sure why that last change was neccessary but it wouldn't compile with out doing it. This seems to have fixed my problem.

0 Kudos
Message 2 of 2
(3,990 Views)