When one of our developers selects build/rebuild/clean, I would like to take a time measurement beforehand. Then, after all of the builds complete, I would like to display in the output window the elapsed time.
Also, in this "post builds" event, I'd like to log the elapsed time and error info (which projects failed, etc.) so we can analyze the metrics at a later date.
The question is, how can I inject this type of logic I know how to do this type of thing per project but how about per solution

Before all builds and after all builds..
msheridan
If you run MSBuild with a higher verbosity setting I believe you'll get the time measurements you're after. Try adding /v:d to the end of the command line to see if that will give you enough info.
If you want to get even fancier you'll have to write a custom logger and handle all the different events. When the start/stop events are fired they also include timestamp/duration information you can then save in whatever format you want (XML, database, file, etc) for further processing by a custom tool. For information on how to write a custom logger check out http://blogs.msdn.com/msbuild/archive/2005/10/10/479223.aspx.
If you write a custom logger you'll see a BuildStarted event get raised when the solution build begins, and a ProjectStarted event raised for each project as it gets built.
Neil