Export (0) Print
Expand All

Creating Code Libraries

Visual Studio .NET 2003

Code libraries allow you to package several related, useful components into a single portable file. This file can then be used to develop other applications, or as a base for inheritance for other components. For more information, see Code Libraries.

To create a code library

  1. Create a new Class Library project.
    Note   The Class Library template is not available in the Standard Edition of Visual Basic .NET. For more information, see Visual Basic Standard Edition Features.

    Two files are created: a default component file and the assembly manifest (AssemblyInfo.vb or AssemblyInfo.cs file), which contains metadata about the code library. For more information, see Assembly Manifest.

  2. If you want to write any new code for your library:
    1. From the Project menu, choose Add New Item to add the appropriate new item (control, component, class, and so on).
    2. Write the appropriate code.
  3. From the Project menu, choose Add Existing Item to add a preexisting item to your code library.
  4. Browse to the appropriate .vb or .cs file and double-click the file to add it.
  5. Build the solution, which will be a .dll file when compiled.
  6. If you want to make your code library available to more than one client application at a time, you may want to install it to the global assembly cache. For more information, see Working with Assemblies and the Global Assembly Cache.
  7. If you plan to make your code library available to COM clients, there are additional considerations to take into account. For more information, see Exposing .NET Framework Components to COM.
  8. Package and deploy your code library. Because your library is not a freestanding application, it would be packaged as a merge module. For more information, see Creating or Adding a Merge Module Project.

See Also

Component Authoring | Components and Assemblies | Component Authoring Walkthroughs | Assembly Manifest

Show:
© 2014 Microsoft