Debug and Release Project Configurations

A Visual Studio project has separate configurations for the release and debug versions of a program. You build the debug version for debugging and the release version for the final release.

Multiple settings are used to determine whether a debug or release version is built. When you use the advanced build configuration, the build type is determined by the Solutions Configurations setting, Configuration Manager settings, and Project Properties settings, which include the Output path. When you use the simplified build configuration, the build type depends on whether you click the Start Debugging command or the Build command.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

Advanced Build Configuration

When you use the advanced build configuration, you have manual control over configuration settings and whether a debug or release version is built. The following sequence describes how the output path and other properties are determined for all build commands.

  1. On the toolbar, the Solution Configurations drop-down list contains the active solution configuration. You select the active solution configuration before you perform a build. The choice is used to determine the project configuration (debug or release) and project platform for projects in the solution, as described in the following step.

    Depending on your development settings, the toolbar might also have a Solution Platforms drop-down list, in which you can set the active solution platform. This choice specifies the platform for which to build the solution. The choices can include x86 (default), x64, Itanium, and Any CPU.

  2. The Configuration Manager contains settings associated with the active solution configuration and the active solution platform from step 1. The Configuration Manager lists the project configuration (debug or release) and the project platform (for example, x86) for each project in the solution.

    You can access the Configuration Manager Dialog Box from the Build menu.

  3. Project Designer pages contain properties associated with each project configuration and project platform from step 2. The Output path setting is on the Compile page (Visual Basic) or Build page (C#). See the Project Designer Pages section later in this topic for more information.

Simplified Build Configuration

When you use the simplified build configuration, Visual Studio determines whether to build a debug or release version. Choosing the simplified build configuration implements the following settings:

  • The Start Debugging command on the Debug menu (F5) creates a debug version, and puts the build in the debug location regardless of the output path you specify.

  • The Build command on the Build menu uses the settings from the appropriate Project Designer pages. The Output path is on the Build page (C#) or Compile page (Visual Basic) of the Project Designer.

  • The Build menu does not contain the Configuration Manager command.

  • The Configuration and Platform drop-down lists do not appear on Project Designer pages.

  • On the toolbar, the Solution Configurations and Solution Platforms drop-down lists are not available.

Project Designer Pages

For Visual Basic projects, the following Project Designer pages contain properties for a project's debug and release configuration:

For C# projects, the following Project Designer pages contain properties for a project's debug and release configuration:

When you use the advanced build configuration, the above Project Designer pages contain a Configuration drop-down list and a Platform drop-down list at the top.

When you use the simplified build configuration, the above Project Designer pages do not contain Configuration and Platform drop-down lists. The Build command on the Build menu uses the settings from these Project Designer pages.

To access the Project Designer pages, Click projectname Properties on the Project menu.

To select the advanced or simplified build configuration

  1. On the Tools menu, click Options.

  2. In the Options dialog box, expand Projects and Solutions, and then click General.

  3. To set the advanced build configuration, select the Show advanced build configurations check box.

    To set the simplified build configuration, clear the Show advanced build configurations check box.

See Also

Tasks

How to: Create and Edit Configurations

How to: Restore Hidden Debugger Commands

Reference

Build Page, Project Designer (C#)

Compile Page, Project Designer (Visual Basic)

General, Projects and Solutions, Options Dialog Box

/platform (C# Compiler Options)

/platform (Visual Basic)

Concepts

Project Settings for a Visual Basic Debug Configuration

Project Settings for C# Debug Configurations