Megosztás a következőn keresztül:


How to: Create and Edit Configurations

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.

Note

The options available in dialog boxes, and the names and locations of menu commands you see, might differ from what is described in Help depending on your active settings or edition. 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 Working with Settings.

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. For example, you can create a Release configuration that optimizes code when building the solution, and a Debug configuration that includes the DEBUG conditional compilation symbol. For more information on property page settings, see Managing Project Properties with the 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.

See Also

Tasks

How to: Prepare and Manage Builds

How to: Edit Common Properties for Solutions

Concepts

Build Configurations

Other Resources

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