05-17-2012 09:56 AM
I am trying to follow this procedure:
http://www.ni.com/white-paper/2739/en
I have .Net 4.0 and VS 2008 on my PC, and am using C#. The doc says to install NI_VISA; I installed the latest version 5.1.2. It then says to add a reference to NationalInstruments.Common and NationalInstruments.VisaNS. When I do that, I get a yellow flag saying the components could not be found. The ref version is 9.1.40.159 for Common and 9.0.40.156 for VISA.
Curiously, I also have a ref version 9.1.20.159 of the Common, and this one will load.
Questions:
1 - How can I get this to work?
2 - Is it possible at all with C#? The NI-VISA docs I have seen all talk about C++
05-17-2012 10:24 AM
Oh, there is more. My VS2008, under <project-name> properties - application tab - targeted framework only allows .Net framework versions 2.0, 3.0, and 3.5 (no 4.0). So I tried to install NI-VISA 5.0.1 instead, but it said that I already have a later version of .Net and would not install. Is the solution to uninstall .Net 4.0? Who knows what that would break.
05-17-2012 04:17 PM - edited 05-17-2012 04:18 PM
I am running Visual Basic Express 2010 on XP.
The required DLLs are found in C:\Program Files\National Instruments\MeasurementStudioVS2010\DotNET\Assemblies
Since you are using VS2008, you should be using 9.1.35.159
That is the only version found in C:\Program Files\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies (64-bit) and the newest version in C:\Program Files\National Instruments\MeasurementStudioVS2008\DotNET\Assemblies
Which DLLs you would use depends on whether you are running Win7 or WinXP.
And, VS2008 goes up to .NET 3.5 not 4.0
Hope that helps.