Visual Studio 2010, how to build projects in parallel on multicore

thomas nn picture thomas nn · May 17, 2010 · Viewed 18.7k times · Source

I have a big solution with more than 40 projects. Almost half of them are test projects. In my project we use both Code Contracts, Code Analysis, Style Analysis. I want to be able to build the projects that are not dependent in parallel on my quad core CPU.

How can I setup msbuild to build the projects in parallel?

Answer

Richard picture Richard · May 17, 2010

In Visual Studio: Tools | Options | Projects and Solutions | Build and Run. This should default to your CPU count.

From the command line: msbuild /maxcpucount[:n] (is n is not specified, then it will use the CPU count).