Microsoft MVP Logo

As many are already aware, the .NET Framework v2.0 added MSBuild. MSBuild is a build platform that decoupled the build process our of earlier versions of Visual Studio. This makes it easy for you to automate and orchestrate the build process on machines that don’t have Visual Studio involved, or to dramatically customize your build process. When you build a project in Visual Studio 2005, the IDE is actually calling MSBuild.

I admit, while I’ve been aware of MSBuild and it’s capabilities, I haven't spent much time trying to understand exact how it works and how you can extend it with custom tasks and targets files. Not until I started following the progress of MSBee, which allows you to develop & build CLR v1.1 projects in Visual Studio 2005, did I fully grasp how powerful & configurable it really is. But with so much on my plate these days, it’s hard to carve time out to follow a tangent… until this past weekend.

The most recent issue of MSDN Magazine (June 2007) has an article Inside MSBuild that details how you can create custom project, custom tasks, and custom targets files to configure your own build solution. Between house chores, Steven’s naps, and random “been gone for a week”, I finally was able to get through this article. It’s a great read… nice long article that really explains how everything works by following an example.

I also stumbled across an open source project by Paul Welter (via Scott Guthrie)that adds a ton of useful custom tasks that you can use in your own build projects, including things like Mail, NDoc, NUnit, Script, SqlExecute, Svn related commands, VSS related commands, FTP, WebDownload, Zip… and that’s just a few!

I’m now looking forward to creating my own build file for one or two of my more complicated build projects. Here are a few links to help you get on your way:

» MSBuild Reference» MSBuild Team Blog» MSBuild Community Tasks (open source tasks mentioned above), project site, & associated blog post

Comments powered by Disqus