Visual Basic Compiler Options |
|
/libpath:dir1[,dir2]
Arguments
- dir1
- A directory for the compiler to look in if a referenced assembly is not found in either the current working directory (the directory from which you are invoking the compiler) or the common language runtime's system directory.
- dir2
- Additional directories to search for assembly references. Separate additional directory names with a comma.
Remarks
The /libpath option specifies the location of assemblies referenced via the /reference option.
The compiler searches for assembly references that are not fully qualified in the following order:
- Current working directory. This is the directory from which the compiler is invoked.
- The common language runtime system directory.
- Directories specified by /libpath.
- Directories specified by the LIB environment variable.
/libpath is additive; specifying it more than once appends to any prior values.
Use /reference to specify an assembly reference.
To set /libpath in the Visual Studio integrated development environment
- Open the project's Property Pages dialog box. For details, see <Projectname> Property Pages Dialog Box.
- Click the Common Properties folder.
- Click the Reference Path property page.
- Modify the Folder property.
To set /libpath programmatically
- See ReferencePath Property.
Example
The following code compiles t2.vb
to create a .exe file. The compiler looks in the working directory and in the root directory of the C drive for assembly references:
vbc /libpath:c:\ /reference:t2.dll t2.vb
See Also
Assemblies | Visual Basic Compiler Options | Sample Compilation Command Lines