Udostępnij za pośrednictwem


Build and Run, Projects and Solutions, Options Dialog Box

Determines whether changed files are automatically saved when a project or its solution is built, the maximum number of Visual C++ projects that can build at the same time, and some default behavior on Run. To access this dialog box, on the Tools menu, click Options, and then select the Projects and Solutions folder and click Build and Run.

  • Before building

    • Save all changes
      Automatically saves changes to the solution file and all project files altered since the last build, without prompting you, when you press F5 or choose the Start or Build command from the Debug or Build menu. Items are saved with their current names. This option is enabled by default.

    • Save changes to open documents only
      Automatically saves changes to all open documents, without prompting you, when you press F5 or choose the Start or Build command from the Debug or Build menu.

    • Prompt to save changes to open documents
      When selected, displays a dialog box asking if you want to save the changes to your solution and project items when you press F5 or choose the Start or Build command from the Debug or Build menu. The Save As dialog box appears so that you can assign a name and location to your project. If this option is not selected, the project runs using the memory image that contains your changes but those changes are not saved.

    • Don't save changes to open documents
      When you run your project, the IDE runs the code version in the open documents and does not save changes to open documents.

  • Maximum number of parallel project builds
    Specifies the maximum number of Visual C++ projects that can build at the same time. To optimize the build process, the maximum number of parallel project builds is automatically set to the number of CPUs of your computer. The maximum is 32. For more information, see Multiprocessor Builds.

  • Only build startup projects and dependencies on Run
    When selected, pressing F5 or choosing the Start or Build command from the Debug or Build menu only builds the startup project and its dependencies. When this option is cleared, pressing F5 builds all projects, dependencies, and solution files. This option is cleared by default.

  • On Run, when projects are out of date
    If a project configuration is out of date when you press F5 or choose the Start command from the Debug menu, a message is displayed. You can choose whether to build the project and whether the message is displayed each time that a project configuration is out of date. Use this option to specify whether the message is displayed and the default build behavior if it is not.

    Note

    This option applies to Visual C++ projects only.

    • Always build
      The message box is not displayed and the out of date project configuration is built. This option is set when you select Do not show this dialog again in the message then select Yes.

    • Never build
      The message box is not displayed and the out of date project configuration is not built. This option is set when you select Do not show this dialog again in the message then select No.

    • Prompt to build
      Displays the message box each time that a project configuration is out of date.

  • On Run, when build or deployment errors occur
    If build errors occur when you choose the Build command from the Build menu, a message is displayed. You can choose whether to continue by launching the application and whether the message is displayed each time that build errors occur. Use this option to specify whether the message is displayed and the default behavior if it is not.

    Note

    This option applies to Visual C++ projects only.

    • Prompt to launch
      Displays the message box each time that build errors occur.

    • Do not launch
      The message box is not displayed and the application is not launched. This option is set when you select Do not show this dialog again in the message box then select No.

    • Launch old version
      The message box is not displayed and the newly built version of the application is not launched. This option is set when you select Do not show this dialog again in the message box then select Yes.

  • For new solutions use the currently selected project as the startup project
    If selected, new solutions use the currently selected project as the startup project.

  • MSBuild project build output verbosity
    Sets the verbosity level for the build output. For more information, see the /verbosity switch in MSBuild Command Line Reference.

See Also

Other Resources

Projects and Solutions, Options Dialog Box

Building in Visual Studio