Partilhar via


/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 (" ").

Comentários

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:

  1. Current working directory. This is the directory from which the compiler is invoked.

  2. The common language runtime system directory.

  3. Directories specified by /libpath.

  4. 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

  1. Have a project selected in Solution Explorer. On the Project menu, click Properties. For more information, see Introdução ao Project Designer.

  2. Click the References tab.

  3. Click the Reference Paths... button.

  4. No Reference Paths caixa de diálogo, digite o nome do diretório a Pasta: caixa.

  5. Click Add Folder.

Exemplo

The following code compiles T2.vb to create an .exe file. O compilador procura no diretório de trabalho, no diretório raiz da unidade c: unidade e no diretório de Assemblies de Novo da unidade c: unidade de referências do assembly .

vbc /libpath:c:\;"c:\New Assemblies" /reference:t2.dll t2.vb

Consulte também

Referência

Exemplos de Linhas de Comando de Compilação (Visual Basic)

Conceitos

Assemblies e o Cache de Assembly Global (C# e Visual Basic)

Outros recursos

Compilador do Visual Basic