From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA 5.1.1 NationalInstruments.Common reference error on Windows XP


@kronik85 wrote:

Ok, I got it to work with an assembly NationalInstruments.Common 9.1.40.159....  It did not work with 9.1.20.159, or 9.1.35.159.  All 3 are listed, although 9.1.20.159 and 9.1.35.159 are listed first, and together. 


Thank you posting your solution, because it also worked for me.

 

Windows XP, Visual Basic 2010 Express, NI-488.2 v3.0.2, and NI-VISA v5.1.2

 

 

0 Kudos
Message 11 of 13
(1,130 Views)

Okay, I am running windows 7 and developing under VS2010 professional and I have been able to compile and run my application without any problems whatsoever...on my development machine. 

 

I originally was having the compile problems "The type NationalInstruments.ISupportSynchronizationContext is a defined assembly that is not referenced..." but when I switched my target framework from ".NET Framework 4 Client Profile" to simply ".NET Framework 4", I got rid of all my compile issues.  Like I said, everything is running fine...on my development machine. 

 

I now have compiled a release version of my application and, again, on my development machine, it runs fine.  BUT...

 

I copy the release .exe along with the NI .dlls, (NationalInstruments.Common.dll, NationalInstruments.NI4882.dll and NationalInstruments.MeasurementStudio.dll) that I think I need to a "clean" machine and try to run it, I get the "Could not load file or assembly 'NationalInstruments.Common Version = 9.0.40.362, Culture = neutral" etc.

 

My application is compiled against NationalInstruments.Common version=9.1.40.159 and that is the version of the dll that I copied to the "clean" machine.  So, if I compiled against version 9.1.40.159 and I have a copy of 9.1.40.159 on the clean machine, why in the world is my application looking for an older version?!

 

Any thoughts would be greatly appreciated.

 

Thanks

0 Kudos
Message 12 of 13
(972 Views)

Hey there,

 

Instead of just coping and pasting the project over, you can create an installer to deploy the project and make sure the correct dependents are included. To create a deployment you can follow this helpful guide.

 

http://digital.ni.com/public.nsf/allkb/ED87C183E056CAC386256DF1004E54C6

 

I hope this helps

Connor

0 Kudos
Message 13 of 13
(958 Views)