|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Run Multiprocessor Builds with DEVENV Command Line Switches
Running Multiprocessor Builds using Devenv Command Line Switches is similar to running multiprocessor builds from the IDE. The number of projects that can build concurrently depends on the value of the Maximum number of parallel project builds property.
To enable multiprocessor builds with DEVENV, the Maximum number of parallel project builds property must be set to a value greater than 1. For information on how to change this property, see How to: Set the Number of Concurrent Builds for Multiprocessor Builds.
When Multiprocessor builds are enabled with DEVENV command line switches, they will automatically run when you invoke DEVENV with the following build options:
To run multiprocessor builds using DEVENV command line switches
Open a command window.
To set the appropriate environment variables to run Visual Studio tools in a command session, you may need to run VSVARS32.BAT or VCVARS32.BAT.
At the command prompt, enter the following command line to build your solution:
devenv <solution>.sln [options] solutionconfig [/project projectnameorfile [/projectconfig name]]
<solution> specifies the name (and path, if necessary) to the solution file.
The following example illustrates multiprocessor builds using DEVENV command line switches. To set up this example, create a new solution named MultiprocExample that comprises two C++ console applications, one named Console1 and the other named Console2.
Use the following command line to run a multiprocessor rebuild for Console1 and Console2, both in Debug configuration.
D:\>devenv "D:\Documents and Settings\username\My Documents\Visual Studio\Projects\MultiprocExample\MultiprocExample.sln" /rebuild Debug