Geeks With Blogs
Daniel Schroeder Sharing my tips and tricks to help other developers be more productive. This blog has moved to http://blog.danskingdom.com

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/

Posted on Friday, March 30, 2012 11:33 AM | Back to top


Comments on this post: Parallel MSBuild FTW - Build faster in parallel

# re: Parallel MSBuild FTW - Build faster in parallel
Requesting Gravatar...
In VS11, this is enabled for C# builds by default - previously only C++ builds. Try out the Beta!
Left by Dan Moseley on Apr 01, 2012 1:34 PM

# re: Parallel MSBuild FTW - Build faster in parallel
Requesting Gravatar...
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 :)
Left by deadlydog on Apr 01, 2012 9:22 PM

# re: Parallel MSBuild FTW - Build faster in parallel
Requesting Gravatar...
Hi
Can u send example for multiple .sln compile in msbuild command
Left by Muralidharan on Jan 17, 2013 12:26 AM

# re: Parallel MSBuild FTW - Build faster in parallel
Requesting Gravatar...
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 :)
Left by deadlydog on Jan 17, 2013 10:12 AM

Your comment:
 (will show your gravatar)


Copyright © deadlydog | Powered by: GeeksWithBlogs.net | Join free