Partilhar via


Como: Criar e editar configurações

Solution build configurations let you select which projects to include in different builds of a project or solution. Project configurations include detailed build and debug settings for each combination of solution build configuration and platform. Creating solution build configurations and project configurations can help you to coordinate your development process with the needs of various user groups, both inside and outside your organization.

ObservaçãoObservação

As opções disponíveis nas caixas de diálogo, os nomes e os locais dos comandos de menu que você vê, podem diferir do que é descrito na Ajuda dependendo das suas configurações ativas ou edição. This Help page was written with the General Development settings in mind. To view or change your settings, choose Import and Export Settings on the Tools menu. For more information, see Trabalhando com configurações.

Working with Configuration Manager

You can create your own configurations using the Configuration Manager dialog box.

To open the Configuration Manager dialog box

  1. In Solution Explorer, select the solution.

  2. On the Build menu, choose Configuration Manager.

    The Configuration Manager dialog box opens.

    The Active Solution Configuration drop-down list displays the name of the current solution build configuration. The Active Solution Platform drop-down list displays the name of the current platform for which to build the solution. The Project Contexts pane lists the projects in the solution, the project configurations and platform specified, and check boxes that indicate whether a project will be included when you build or deploy the solution using this configuration.

Once you have configurations created, you can set different properties for your project based on those configurations.

To set properties based on configurations

  1. In Solution Explorer, select a project.

  2. On the View menu, choose Property Pages.

    The Project Property Pages window opens.

    You can set different properties based on your configurations. Por exemplo, você pode criar uma configuração de lançamento que otimiza o código ao criar a solução e uma configuração de depuração que inclui o DEBUG símbolo de compilação condicional. Para obter mais informações sobre configurações de página de propriedades, consulte Gerenciando as Propriedades de Projeto com o Project Designer.

Working with Project Configurations

Here are common procedures for creating and managing project configurations:

To create a Project Configuration

  1. Open the Configuration Manager dialog box.

  2. Select a project in the Project column.

  3. Select the Configuration drop-down menu for that project, and choose New.

    The New Project Configuration dialog box opens.

  4. In the Name text box, type a name for the new configuration.

  5. To use the same property settings as those specified for an existing project configuration, choose a configuration from the Copy settings from drop-down list.

  6. To create a new solution configuration at the same time, select the Create new solution configuration check box.

To rename a Project Configuration

  1. Open the Configuration Manager dialog box.

  2. Select a project with a project configuration to rename.

  3. On the Configuration drop-down list for that project, choose Edit.

    The Edit Project Configurations dialog box opens.

  4. Select the project configuration name you want to change.

  5. Select Rename, then type a new name for the configuration.

Working with Solution Build Configurations

Here are common procedures for creating and managing solution build configurations:

To create a Solution Build Configuration

  1. Open the Configuration Manager dialog box.

  2. On the Active Solution Configurationdrop-down list, choose New.

    The New Solution Configuration dialog box opens.

  3. Type a name for the new solution build configuration in the Name text box.

  4. To use the same settings as those specified for another solution build configuration, choose one from the drop-down list for the Copy settings from textbox.

  5. If you want to create one or more project configurations at the same time, select the Create new project configurations check box.

To rename a Solution Build Configuration

  1. Open the Configuration Manager dialog box.

  2. On the Active Solution Configuration drop-down list, choose Edit.

    The Edit Solution Configurations dialog box opens.

  3. Select the solution build configuration name you want to change.

  4. Select Rename, then type a new name for the configuration.

To select and edit a Solution Build Configuration

  1. Open the Configuration Manager dialog box.

  2. Select the desired solution build configuration from the Active Solution Configuration drop-down menu at the top of the dialog box.

    The Project Contexts panes display the properties of the active solution build configuration.

  3. Select any project available in the solution.

  4. Select the desired project Configuration and Platform. Together, these two settings specify the project configuration to be used.

  5. If the project is to be included when you build this solution build configuration, select the Build check box.

Consulte também

Tarefas

Como: Preparar e gerenciar compilações

Como: Editar propriedades comuns para soluções

Conceitos

Criar configurações

Outros recursos

Configuration, Configuration Properties, Solution Property Pages Dialog Box

Solution Property Pages Dialog Box

Startup Project, Common Properties, Solution Property Pages Dialog Box

Project Dependencies, Common Properties, Solution Property Pages Dialog Box