/libpath
Specifies the location of referenced assemblies.
/libpath:dirList
Arguments
Term |
Definition |
dirList |
Required. Semicolon-delimited list of directories 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. If the directory name contains a space, enclose the name in quotation marks (" "). |
Remarks
The /libpath option specifies the location of assemblies referenced by 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.
The /libpath option 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 |
|
Example
The following code compiles T2.vb to create an .exe file. The compiler looks in the working directory, in the root directory of the C: drive, and in the New Assemblies directory of the C: drive for assembly references.
vbc /libpath:c:\;"c:\New Assemblies" /reference:t2.dll t2.vb
See Also
Reference
Sample Compilation Command Lines (Visual Basic)
Concepts
Assemblies and the Global Assembly Cache (C# and Visual Basic)