Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a parallel build in Visual Studio 2013?

According to this MSDN article:

http://msdn.microsoft.com/en-us/library/cyz1h6zd.aspx

one "can run multi-processor builds for C++ and C# projects." using the IDE. My solution contains only C# projects, but when I do "Build Solution" I can only see one MSBuild process in task manager and one csc.exe process.

In Tools -> Options -> Projects and Solutions -> Build and Run I have "maximum number of parallel project builds" set to 4 and my computer has 4 cores.

Is it possible to setup VS2013 to build my solution projects in parallel?

like image 613
Ivan P. Avatar asked May 07 '14 16:05

Ivan P.


People also ask

What is parallel build?

Parallel building, when the term is applied to clearmake, is the ability to run multiple compiles simultaneously on the same system by understanding the build order dependency graph described in the makefile (the order in which files must be built, based on their dependencies).

Does Visual Studio use multi-core?

As you wished, VS IDE does support multi-core build process. VS first will get a basic performance evaluation based on your current CPU hardware. Then, you should open the switch under Tools-->Options-->Projects and Solutions-->Build and Run-->and you will see maximum number of parallel project builds.

What is batch build in Visual Studio?

You can build, rebuild, and clean multiple solution and project configurations. The combination of configurations can be stored as a Preset for easy access. Open the Batch Build dialog from the tray-icon menu or the Visual Studio Incredibuild menu.

Is MSBuild multithreaded?

MSBuild supports multithreaded building, but only at the project level, and obviously dependency projects have to be compiled before the projects that depend on them so there are practical limits to parallelism.


1 Answers

I tested the option you mentioned on my larger solution with lot of independend projects in VS2013 and it builds these projects in 4 newly spawned build processors.

enter image description here

If your projects depend on each other the build will have difficulty to run concurrently. But it basically does work in VS2013.

For reference this is the setting: enter image description here

Putting 8 in there spawned 8 build processors.

like image 93
BlueM Avatar answered Sep 28 '22 17:09

BlueM