At my current workplace we have 203 projects in a single tanged web of a solution. This unfortunately means the majority of projects need to be built for any of the services or sites to function, thus breaking down the solution is not a viable solution at the moment. So I took a look at reducing those build times, and here are my results:
Rebuilding your solution
Running a rebuild in visual studio 2008 takes…
*Sigh* Let’s try the same thing in the Visual Studio 2008 Command prompt:
Msbuild.exe mysolution.sln /t:rebuild
*Wow* Let’s add some tweaks, first up is the multicore build tweak.
Msbuild.exe mysolution.sln /t:rebuild /m
*Pretty cool* There’s a strange bug in the normal command line which slows down execution of running programs. So let’s use a filelogger instead of a console logger.
Msbuild.exe mysolution.sln /t:rebuild /m /noconsolelogger /fl
Try it out and see if you get a decent benefits!
Building your solution
Running a normal build inside Visual Studio takes:
And using the command line:
Msbuild.exe mysolution.sln /t:build
Now with the multicore tweak:
Msbuild.exe mysolution.sln /t:build /m
So all in all not a bad way to manage a solution with 203 projects in it!