My situation
In the C# project I am now working on we have a fairly big solution (80+ projects). Now rebuild times of 5 minutes+ are really becoming quite a problem using MSBuild from Visual Studio 2008.
In an analysis I did last week it turned out that my build time was spent as follows:
Copying files to the projects and recopying it to the projects that depend on it (CopyToLocal), etc. (60%)
Invoking a postbuild to decompile/compile. (20%)
Doing the actual compilation, etc. (20%)
Apart from the 'normal' project bin\debug
folders output is also copied to an external directory to set up the main 'loader' program. The main program structure is a bit like this:
\loader\bin\loader.exe
\loader\plugin\plugin1\plugin1.dll
\loader\plugin\plugin1\somedependency.dll
What I did
In an attempt to make things go a little faster I thought of the following:
Copy all the files to one a big bin directory and don't use CopyTolocal. I don't like this because we can no longer use different versions of the same DLL files and my bin directory is getting quite a mess.
Use parallelism (/m) for MSBuild. This helps only very little in build times.
Try to reduce dependencies between projects which is always a good thing of course.
Invest in hardware. I found some research on solid-state drives, but this does not seem promising.
My question
I also noticed that when I make a change to a project that is at the root of my dependency tree everything gets rebuild. Even if the change was only in the 'private' part and the interface of the project did not change.
Does MSBuild use a timestamp of dependent projects to determine if a project needs a rebuild?
Can this be changed to a different condition? For example, the checksum of the file?
Apart from this specific suggestion I would sure appreciate all suggestions to make build times faster.