Daniel Schroeder

Sharing my tips and tricks to help other developers be more productive. This blog has moved to http://blog.danskingdom.com
posts - 44 , comments - 40 , trackbacks - 0

My Links

News

This blog has moved to http://blog.danskingdom.com

Twitter












Archives

Parallel MSBuild FTW - Build faster in parallel

Hey everyone, I just discovered this great post yesterday that shows how to have msbuild build projects in parallel Smile

Basically all you need to do is…

Read more at http://blog.danskingdom.com/parallel-msbuild-ftw-build-faster-in-parallel/

Print | posted on Friday, March 30, 2012 11:33 AM |

Feedback

Gravatar

# re: Parallel MSBuild FTW - Build faster in parallel

In VS11, this is enabled for C# builds by default - previously only C++ builds. Try out the Beta!
4/1/2012 1:34 PM | Dan Moseley
Gravatar

# re: Parallel MSBuild FTW - Build faster in parallel

Yeah, I'm using the VS 11 beta already :) I remembered hearing that VS11 would build in parallel, but couldn't find any options relating to parallel C# builds in VS (although I could find the C++ ones). This info is still useful though when building from script files, which is often how I first build our codebase each morning after getting latest :)
4/1/2012 9:22 PM | deadlydog
Gravatar

# re: Parallel MSBuild FTW - Build faster in parallel

Hi
Can u send example for multiple .sln compile in msbuild command
1/17/2013 12:26 AM | Muralidharan
Gravatar

# re: Parallel MSBuild FTW - Build faster in parallel

Muralidharan, if you want to build multiple solutions you would just specify another MSBuild command:
MSBuild /maxcpucount:%NumberOfProcessesToUseForBuild% /p:BuildInParallel=%BuildInParallel% "C:\dev\Solution1.sln"
MSBuild /maxcpucount:%NumberOfProcessesToUseForBuild% /p:BuildInParallel=%BuildInParallel% "C:\dev\Solution2.sln"

If your solutions do not have any dependencies on each other, then you can build them simultaneously. In a batch file you can trigger this using the START comand, so you would have:
MSBuild /maxcpucount:%NumberOfProcessesToUseForBuild% /p:BuildInParallel=%BuildInParallel% "C:\dev\Solution1.sln"
START "MSBuild /maxcpucount:%NumberOfProcessesToUseForBuild% /p:BuildInParallel=%BuildInParallel% "C:\dev\Solution2.sln""

This will build Solution1.sln in the current batch window, and then open another batch window to build Solution2.sln in. Hope that helps :)
1/17/2013 10:12 AM | deadlydog
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: