Como: Definir o caminho de referência (C#)

When you reference an assembly in your project, Visual Studio first searches for the assembly in the project directory. Se você usar uma assembly não localizada no diretório do projeto, você pode especificar seu local no Reference Paths o painel da Project Designer.

ObservaçãoObservação

The procedure for setting the reference path for Visual Basic projects is slightly different. For more information, see Como: Adicionar ou remover referências no Visual Studio.

ObservaçãoObservação

Se a referência ao assembly não está no projeto ou listada na Reference Paths painel do Project Designer, Visual Studio verifica os diretórios que exibem arquivos a Add Reference caixa de diálogo.

You can add as many reference paths as you need.

ObservaçãoObservação

Seu computador pode mostrar nomes ou locais diferentes para alguns dos elementos da interface do usuário do Visual Studio nas instruções a seguir. A edição do Visual Studio que você possui e as configurações que você usa determinam esses elementos. Para obter mais informações, consulte Configurações do Visual Studio.

To set a reference path

  1. In Solution Explorer, select the project.

  2. On the Project menu, click <Project Name> Properties.

  3. Click Reference Paths.

  4. In the Folder text box, specify the path of the folder that contains assemblies. To browse to the folder, click the ellipsis (…).

  5. Click Add Folder.

To overwrite a reference path

  1. In Solution Explorer, select the project.

  2. On the Project menu, click <Project Name> Properties.

  3. Click Reference Paths.

  4. In the Reference Path box, select the path to overwrite.

  5. In the Folder text box, specify the path of the folder that contains assemblies. To browse to the path, click the ellipsis (…).

  6. Click Update. The path selected in the Reference Path box is overwritten with the path specified in the Folder text box.

To remove a reference path

  1. In Solution Explorer, select the project.

  2. On the Project menu, click <Project Name> Properties.

  3. Click Reference Paths.

  4. In the Reference Path box, select the path to remove.

  5. Click Remove.

Consulte também

Conceitos

Introdução ao Project Designer