In my last project we used MSBuild as a scripting language. (yeah, really!) We also wrote hundreds of custom MSBuild tasks, for the parts that made more sense in C#. (I even wrote an MSBuild task to generate the boilerplate code for an MSBuild task. Yes, it consumed itself.)
While I don't recommend anyone else take this same approach, one of the things I found very helpful was the built-in dependency management. As you'd expect, it was easy to express dependency relationships and let MSBuild take care of satisfying them. For example, almost every step in our software required that a certain set of files be copied to a certain location. You could easily write:
Step1: CopyFiles
Step2: CopyFiles, Step1
and when you execute Step2
, it would only copy the files once.
Building and satisfying a dependency tree is a pretty common in software. I wish the MSBuild team would take their dependency management code, decouple it from MSBuild, and move it in to the .NET Framework where anyone can use it. Baring that, what do you think is the best option for managing dependencies this way?