Archived:Create and Call a .NET Assembly with Visual Studio 2008

Updated Oct 24, 2020

National Instruments does not actively maintain this document.

This content provides support for older products and technology, so you may notice outdated links or obsolete information about operating systems or other relevant products.

Environment

Programming Language

  • C# .NET
  • Visual Basic .NET

I am working with Visual Studio 2008 and I want to create a VB .NET Assembly and call it from another VB .NET project. How can this be done?

Follow these steps to create and call a .NET assembly with Visual Studio 2008:

Create the Assembly:
  1. Select File » New » Project from the menu.
  2. Select Class Library from the template menu.
  3. Type the following code in the .vb file:
  4. Select Build Solution from the Build menu.
  5. Once the DLL is created, copy and paste it in the C:\ directory.
Call the Assembly:
  1. Select File » New » Project from the menu.
  2. Select Console Application from the template menu.
  3. Type the following code in the .vb file:
  4. You now will be able to build and execute this code.

Additional Information

.NET Framework Error Message When Using the .NET Controller Wizard in LabWindows/CVI