Creating Code Libraries
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
- 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.
- If you want to write any new code for your library:
- From the Project menu, choose Add New Item to add the appropriate new item (control, component, class, and so on).
- Write the appropriate code.
- From the Project menu, choose Add Existing Item to add a preexisting item to your code library.
- Browse to the appropriate .vb or .cs file and double-click the file to add it.
- Build the solution, which will be a .dll file when compiled.
- 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.
- 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.
- 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.