Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Include NI-VISA .NET API in Visual Studio 2017 project

Solved!
Go to solution

This is a follow-up to the question asked here.  How do I go about including a reference to the NI-VISA .NET API in my Visual Studio 2017 C# project?  My earlier projects have used VisaNS.dll, but I gather from the documentation that this has been deprecated in favour of the .NET API.

 

It would be helpful if someone could go through in detail the steps involved in downloading the new API (if necessary) and adding a reference to it in a C# project.  All the documentation I can find on this site still refers to VisaNS.dll.

0 Kudos
Message 1 of 10
(5,837 Views)

Hi,

 

You need to reference assembly "Ivi.Visa" to use the new "IVI-compliant NI-VISA .NET API". See here for more info and the differences between NI VISA .NET  and VisaNS API.

 

Regards,

Kelly

0 Kudos
Message 2 of 10
(5,809 Views)

Kelly, thanks.  There appears to be a link missing from your message.

0 Kudos
Message 3 of 10
(5,805 Views)

My apologies, below is the link:

http://www.ni.com/product-documentation/52841/en/

0 Kudos
Message 4 of 10
(5,803 Views)

Kelly, thanks.

 

That page links to this page, which states (in Part 3) that the NI-VISA .NET API is "included in the driver installer".  I assume that this is the standard installer for NI-VISA.  Where do I find the Ivi.Visa library, after installing NI-VISA?  If I select ".NET 4.5 Development Support" in the NI-VISA installer, that just installs the old VisaNS.dll.

0 Kudos
Message 5 of 10
(5,799 Views)

IVI.Visa dll is installed here: C:\Program Files (x86)\IVI Foundation\VISA\Microsoft.NET\Framework32\v2.0.50727\VISA.NET Shared Components 5.8.0

 

It should also show up in Visual Studio references see attachment.

 

0 Kudos
Message 6 of 10
(5,789 Views)

cymrieg, thanks.

 

Perhaps I should have asked this question earlier - what's the first version of NI-VISA to include the .NET API?  It may just be that I don't have a new enough version.

0 Kudos
Message 7 of 10
(5,784 Views)
0 Kudos
Message 8 of 10
(5,777 Views)

cymreig, thanks.  I have 15.5 installed on my system, so that isn't the problem.  I'll try uninstalling VISA altogether and re-installing it.

0 Kudos
Message 9 of 10
(5,772 Views)
Solution
Accepted by topic author Tevildo

Just a quick note to let everyone know that reinstalling NI-VISA fixed the problem.  The required element is .NET 4.0 - 4.5.1 Development Support (IVI).  For some reason, this didn't come up in the "Modify" menu from Control Panel.

0 Kudos
Message 10 of 10
(5,741 Views)