Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Do I Create and Call a .NET Assembly with Visual Studio 2008?

Primary Software: Measurement Studio>>.NET Support
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
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?

Solution:
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.
     


Related Links:
KnowledgeBase 39CMC50U: Multiple Errors When Building a Visual Studio .NET Application with Measurement Studio 7.0 Merge Modules
KnowledgeBase 3S7CP9HY: .NET Framework Error Message When Using the .NET Controller Wizard in LabWindows/CVI

Attachments:


VS2008 Source Code Assembly.zip


Report Date: 01/06/2009
Last Updated: 12/21/2009
Document ID: 4T5268BA

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit