why be normal?
Welcome to Sign in | Help
in Search

Review: Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build

Last post 07-17-2009, 2:12 by icelava. 0 replies.
Sort Posts: Previous Next
  •  07-17-2009, 2:12 5850

    Review: Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build

    When the Microsoft Developer Division sat down to consider the future of .NET development from v2.0 onwards, they recognised the build process in Visual Studio .NET was primitive in its facilities. It had to be re-architected to provide a much more flexible and extensible mechanism. Thus the re-engineering endeavour that brought us MSBuild. Although it was modeled after NAnt and featured some intriguing concepts, widespread adoption was not achieved. As in, conscious manipulation and customisation.

    Sure, most developers simply think Ctrl-Shift-B when "build" is mentioned; it remains an invisible compile tool in Visual Studio in their eyes. But for those who did knew the advent of MSBuild, the woefully inadequate documentation prevented many from properly understanding the arcane concepts it brings to the table. Lack of understanding directly affects utilisation. I was one such individual who struggled last year to find relevant material to explain what I needed to know and do to achieve what I thought were pretty common build steps. Suffice to state I was disillusioned and disappointed.

    Which brings me to this executive summary: I wished Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build was published last year when I needed it.

    Inside the Microsoft Build Engine: Using MSBuild and Team Foundation Build

    This book is what the stock documentation should have been. Sayed Ibrahim Hashimi and William Bartholomew must have realised that - developers were not getting much out of those materials - and wrote the first three chapters of Part 1 to slowly and meticulously explain the concepts and important elements one works with in MSBuild. When necessary, line-by-line details are elaborated, and the MSBuild samples are always accompanied by sample prints of the console screen output as well to illustrate the point. While this is no excuse for relieving folks from trying things out themselves, it runs the extra mile to help me understand the theory since I tend to read while commuting. Being able to finally grasp those elusive concepts was a joyous event.

    The book also covers extensibility avenues, teaching the underlying framework and showing how to develop custom tasks and loggers, even how to refactor the MSBuild project elements into smaller files; they give a clearer picture how all these pieces combine together to form the entire build workflow and possible extensibility points for one to inject custom targets and tasks. But this book is not just about the official stock product either; the authors recognise weak points in the current implementation and devote a significant portion of the book to suggest a variety of alternative solutions from third-party add-ons from CodePlex or Tigris to overcome problems that may be commonly encountered by build teams. Differences between MSBuild 2.0 and 3.5 are also noted to provide readers with heightened awareness of what they can or cannot do with a particular version. The last Part that details working with Team Foundation Build is also an extremely helpful segment that I have been dying to know how builds are implemented and managed in Team Foundation Server.

    As much as I love this book for filling critical gaps in my MSBuild knowledge, one thing that I did find lacking was a full-fledge demonstration of how to define an end-to-end build project that does different things all based on conditions from the previous steps. Like, invoking code analysis only if unit tests all pass, building and deployment release configuration only if debug configuration passes tests, emailing to the team the statistics or status of deployment, etc. Many of the demonstrations are isolated in their demonstration. While the content has done a fine job explaining the individual concepts, MSBuild as an XML-based semantic still remains highly arcane; more unified samples would have helped many. There is no mention of CruiseControl.NET either, which probably means it is not as popular as I was led to think.

    Any build engineer or developing tinkering with project builds, absolutely needs to read this book. It will fill many of the blanks the standard documentation never provided, and widen your search for better ideas to improve your build.

    Overall rating: 9/10
    Yes Must-have supplement to SDK docs; meticulous explanations; liberal alternative recommendations
    No could have demonstrated more unified, sophisticated build sequences with conditional paths; no CruiseControl.NET

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems