I have seen some of the most bizarre things when it comes to automating builds. I have used many different tools to try to automate a build. The result is usually a frail build that is not easily extendable and only works on a few machines. This is why most companies I have worked with have resorted to always using a single machine for the build. This machine usually has a defined set of service packs and development tools installed, which becomes a maintenance niare. This is a disaster because now you (and if you are lucky, one other guy) are the only people that can build the product and on only one machine. If that machine goes down, or if you want to go on vacation, you are out of luck! Tons of time could be wasted on creating a build infrastructure that is portable and extendable. Luckily, NAnt, a .NET port of a Java tool Ant, is freely available to use.
This chapter is meant to get you up and running in one day. Many of the examples can be used as templates for any build. For instance, you can take the Master Build example tied together and build both the Windows Application example and the Web Services example to create quite an application. For advanced applications that have hundreds of projects, you can see the need for a tool like NAnt.