Show/Hide Toolbars

XSharp

Build configurations are used when you need to build your projects with different settings. For example, Debug and Release are two configurations that use different compiler options during the build process. There is one configuration that is active, which is indicated in the command bar at the top of the Visual Studio IDE.

 

VsBuildToolbar

 

The configuration and the platform control where built output files are stored. Normally, when Visual Studio builds your project, the output is placed in a project subfolder named with the active configuration (for example, bin/Debug), but you can change that.

You can create your own build configurations at the solution and project level. The solution configuration determines which projects are included in the build when that configuration is active. Only those projects that are specified in the active solution configuration will be built. If multiple target platforms are selected in Configuration Manager, all projects that apply to that platform are built. The project configuration determines which build settings and compiler options are used when you build the project.

To create, select, modify, or delete a configuration, you can use the Configuration Manager. To open it, on the menu bar, choose Build > Configuration Manager, or just type Configuration in the search box. You can also use the Solution Configurations list on the Standard toolbar to select a configuration or open the Configuration Manager.

 

ConfigurationManager

 

By default, Debug and Release configurations are included in projects that are created using Visual Studio templates. A Debug configuration supports the debugging of an app, and a Release configuration builds a version of the app that can be deployed. For more information, see How to: Set debug and release configurations. You can also create custom solution configurations and project configurations. For more information, see How to: Create and edit configurations.

Solution Configurations

 

A solution configuration specifies how projects in the solution are to be built and deployed. To modify a solution configuration or define a new one, in the Configuration Manager, under Active solution configuration, choose Edit or New.

Each entry in the Project contexts box of a solution configuration represents a project in the solution. For every combination of Active solution configuration and Active solution platform, you can define how each project is used. (For more information about solution platforms, see Understand build platforms.)

When you define a new solution configuration and select the Create new project configurations check box, Visual Studio automatically assigns the new configuration to all of the projects. Likewise, when you define a new solution platform and select the Create new project platforms check box, Visual Studio automatically assigns the new platform to all of the projects. Also, if you add a project that targets a new platform, Visual Studio adds that platform to the list of solution platforms and assigns it to all of the projects. You can still modify the settings for each project.

The active solution configuration also provides context to the IDE. For example, if you are working on a project and the configuration specifies that it will be built for a mobile device, the Toolbox pnly displays items that can be used in a mobile device project.

Project Configurations

The configuration and platform that a project targets are used together, to specify the build settings and compiler options to use when it is built. A project can have different settings for each combination of configuration and platform. To modify the properties of a project, open the shortcut menu for the project in Solution Explorer, and then choose Properties. At the top of the Build tab of the project designer, choose an active configuration to edit its build settings.

See the project properties dialogs for more information on which project properties are configuration-dependent and which are configuration-independent.