Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can MS Visual Studio compile projects using 2 or 4 cores on CPU?

Is it any compilator option of flag?

like image 608
Svetlana Avatar asked Sep 09 '08 13:09

Svetlana


People also ask

Does Visual Studio use multiple cores?

As you wished, VS IDE does support multi-core build process.

Does compiling code use multiple cores?

Building larger solutions in Visual Studio can be tediously slow. Part of the reason is that the compiler does not make use of multiple CPU cores well.


3 Answers

You can if you setup an external tool pointing to MsBuild to build the solution with the multiple process flag /m.

Scott Hanselman wrote a nice post on how to accomplish this, so I won't repeat what he has already done.

like image 78
Dale Ragan Avatar answered Oct 09 '22 12:10

Dale Ragan


MSDN answers your question:

Using Multiple Processors to Build Projects

like image 23
aku Avatar answered Oct 09 '22 13:10

aku


In case anyone comes across this, VS2012 introduced parallel builds as a standard feature. Quote from the article:

Visual Studio 2010 included an option for "maximum number of parallel project builds." Although there was no indication of any restriction, this IDE option only worked for C++ projects. Fortunately, this restriction no longer applies to Visual Studio 11. Rather, there's now full support for parallel builds in other languages as well. To view this, run a copy of Process Explorer at the same time a solution with numerous projects is building. You'll see that multiple MSBuild instances are created -- as many as specified in the "maximum number of parallel project builds."

like image 40
Co7e Avatar answered Oct 09 '22 13:10

Co7e