This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

VISA and GPIB Application Development Using C# or VB.NET

Updated Jul 4, 2019

Reported In


  • NI-488.2

Issue Details

I am trying to develop a C# or Visual Basic .NET Framework application that uses VISA or GPIB communication. How can I go about doing this?


National Instruments provides native .NET interfaces with the NI-488.2 (GPIB communication) and NI-VISA drivers for use in C# and Visual Basic .NET (VB.NET). The driver software also includes documentation and shipping examples for using VISA and GPIB in C# and VB.NET. Follow these links to download NI-VISA and NI-488.2 .

These .NET features are installed by the respective hardware driver installer. Make sure to enable .NET support by selecting to install the desired .NET Framework Language in the installer Features tree. This is under Application Support for NI-488.2 or Development Support for NI-VISA. See the Features options for the NI-488.2 (GPIB) and NI-VISA installers in the images below:


The installer will also install documentation for the 488.2 and VISA .NET class libraries into the MSDN help collection. You access the NI-488.2 and NI-VISA .NET API function reference through the Help menu in Visual Studio .NET in the same manner that you access .NET framework class library help.

Adding References to a .NET Project
To use the GPIB or VISA API in a .NET project, you must first add the appropriate reference to the project. To add a reference to a project, simply select the project in the Solution Explorer and click Project»Add Reference... The references for the GPIB and VISA APIs are:
  • 488.2 (GPIB) API Reference: National Instruments 488.2
  • VISA API Reference: National Instruments VisaNS

Additional Information

Missing .NET Support
If the drivers are already installed, but .NET Support is missing, then modify the driver to include the desired .NET support. To modify the driver, follow these steps:
  1. Go to Control Panel»Programs and Features (or Add/Remove Programs for Windows XP). 
  2. Select National Instruments Software
  3. Click Uninstall/Change. This will open a list of National Instruments software on the computer. 
  4. Select your driver (e.g. NI-VISA) and click Modify.This should open the windows depicted in the images above. 
  5. Under the Development Support for NI-VISA or Application Support for NI-488.2, select the .NET Framework support to install. Click on the drop-down arrow and select Install this feature to local drive
  6. Click Next and follow the steps to install the .NET Support. A computer reboot may be required.


Not Helpful