Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer)

Inside the Microsoft® Build Engine: Using MSBuild and Team Foundation Build (PRO-Developer)
Authors
Sayed Ibrahim Hashimi, William Bartholomew
ISBN
0735626286
Published
07 Jan 2009
Purchase online
amazon.com

As software complexity increases, proper build practices become ever more important. This essential reference drills inside MSBuild and shows how to maximize your control over the build and deployment process. Learn how to customize and extend build processes with MSBuild and scale them to the team, product, or enterprise level with Team Foundation Build.

Page 2 of 2
  1. Editorial Reviews
  2. Customer Reviews

Customer Reviews

Gökhan Öztürk said
This book is a real practical approach, explains the main idea from top to bottom and helps to be a senior buildmaster even if you are junior. Less technical sources help you gain that much experience in a limited time.

I have a comment about a specific part of the book at page 330, chapter 12 - Team build Cookbook - , (i don't know what version i have) about implementing SandCastle to the TeamBuild with SandCastle version 1.7.0.0, which is out of date. The latest SandCastle release, 1.8.0.1 contains a new MSBuild project file format that no longer requires the console mode builder. You can use MSBuild to build the project files. See the 1.8.0.0 and 1.8.0.1 release notes. [...]

Steven Koh said
This is a great book like what all had said.
The chapter 8 & 9 are good, a pity too short since this is not a Cook Book.

It will be perfect if the authors can write a "MSBuild: Cook Book" in future.

Aaron Seet said
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.

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 [..] 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
Good: Must-have supplement to SDK docs; meticulous explanations; liberal alternative recommendations
Bad: could have demonstrated more unified, sophisticated build sequences with conditional paths; no [...]

coffee_fan said
To say that I dislike MSBuild is an understatement, yet building is a fundamental part of .NET tools and if you want to play in that area, MSBuild comes with the territory.

Mr. Sayed Ibrahim does a very good job of dissecting and explaining the build process, which does not make me like MSBuild, but at least makes it approachable. For that, I am grateful and think that the book is amply worth the price.

As to my four stars, they are due to my perception that the book could have been written more concisely with additional editing effort. For example, Chapter 1 is excellent. Chapters 2 and 3 are mostly repetitive, and could have been built better by relying more in chapter 1.

Daniel Moseley said
I'm a developer on MSBuild; Sayed wrote this book with our encouragement, and we reviewed it for accuracy and completeness, so I can recommend it. The documentation for MSBuild in 2.0 and 3.5 was not great; I consider this something like the missing manual. Unfortunately there aren't many other MSBuild books; fortunately Sayed did a good job on this one.

We're fixing a lot of what's "missing" in MSBuild in the upcoming version 4.0 -- I hope Sayed can do a 2nd edition when that comes out. Plus, our docs should be better then :-)

Dan

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perl - The only language that looks the same before and after RSA encryption.” - Keith Bostic