How to: Run Multiprocessor Builds in the IDE

This document describes how to run multiprocessor builds from the IDE.

The maximum number of parallel project builds property specifies the number of projects in a solution that can build concurrently. If the value of that property is greater than 1, multiprocessor builds are enabled. For more information, see How to: Set the Number of Concurrent Builds for Multiprocessor Builds.

Multiprocessor builds are supported by build commands such as Build Solution, Rebuild Solution, and Clean Solution. Build commands are available on the Build menu or when you right-click a project or solution node in Solution Explorer.

To run multiprocessor builds on all projects in a solution

  1. Open the solution that contains the projects that you want to build.

  2. Click the Build menu.

    Or, in Solution Explorer, right-click the solution node to display the shortcut menu.

  3. Select a build command.

    The project system will perform the build action and display the build output in the Output Window.

Example

The following example illustrates a multiprocessor build in the IDE. This example uses a solution named MultiprocExample that consists of three C++ console applications named ConsoleApp1, ConsoleApp2, and ConsoleApp3. When the Rebuild Solution command is run, the build produces the following output.

1>------ Rebuild All started: Project: ConsoleApp2, Configuration: Debug Win32 ------
2>------ Rebuild All started: Project: ConsoleApp1, Configuration: Debug Win32 ------
2>Build started 3/26/2010 5:20:31 PM.
2>PrepareForBuild:
2>  Creating directory "c:\users\my_user_name\documents\visual studio 2010\Projects\MultiprocExample\Debug\".
2>InitializeBuildStatus:
2>  Creating "Debug\ConsoleApp1.unsuccessfulbuild" because "AlwaysCreate" was specified.
1>Build started 3/26/2010 5:20:31 PM.
1>InitializeBuildStatus:
1>  Creating "Debug\ConsoleApp2.unsuccessfulbuild" because "AlwaysCreate" was specified.
2>ClCompile:
2>  stdafx.cpp
1>ClCompile:
1>  stdafx.cpp
2>  ConsoleApp1.cpp
1>  ConsoleApp2.cpp
2>Manifest:
2>  Deleting file "Debug\ConsoleApp1.exe.embed.manifest".
1>Manifest:
1>  Deleting file "Debug\ConsoleApp2.exe.embed.manifest".
2>LinkEmbedManifest:
2>  ConsoleApp1.vcxproj -> c:\users\my_user_name\documents\visual studio 2010\Projects\MultiprocExample\Debug\ConsoleApp1.exe
2>FinalizeBuildStatus:
2>  Deleting file "Debug\ConsoleApp1.unsuccessfulbuild".
2>  Touching "Debug\ConsoleApp1.lastbuildstate".
2>
2>Build succeeded.
2>
2>Time Elapsed 00:00:02.09
1>LinkEmbedManifest:
1>  ConsoleApp2.vcxproj -> c:\users\my_user_name\documents\visual studio 2010\Projects\MultiprocExample\Debug\ConsoleApp2.exe
3>------ Rebuild All started: Project: ConsoleApp3, Configuration: Debug Win32 ------
1>FinalizeBuildStatus:
1>  Deleting file "Debug\ConsoleApp2.unsuccessfulbuild".
1>  Touching "Debug\ConsoleApp2.lastbuildstate".
1>
1>Build succeeded.
1>
1>Time Elapsed 00:00:02.07
3>Build started 3/26/2010 5:20:33 PM.
3>InitializeBuildStatus:
3>  Creating "Debug\ConsoleApp3.unsuccessfulbuild" because "AlwaysCreate" was specified.
3>ClCompile:
3>  stdafx.cpp
3>  ConsoleApp3.cpp
3>Manifest:
3>  Deleting file "Debug\ConsoleApp3.exe.embed.manifest".
3>LinkEmbedManifest:
3>  ConsoleApp3.vcxproj -> c:\users\my_user_name\documents\visual studio 2010\Projects\MultiprocExample\Debug\ConsoleApp3.exe
3>FinalizeBuildStatus:
3>  Deleting file "Debug\ConsoleApp3.unsuccessfulbuild".
3>  Touching "Debug\ConsoleApp3.lastbuildstate".
3>
3>Build succeeded.
3>
3>Time Elapsed 00:00:00.86
========== Rebuild All: 3 succeeded, 0 failed, 0 skipped ==========

See Also

Tasks

How to: Run Multiprocessor Builds with DEVENV Command Line Switches