Geeks With Blogs
Drewby Made from 60% post-consumer recycled fiber.

Ok, that's probably a terrible analogy, but XML is what makes Nant taste so good. Why? Not because it makes build files easy to understand or read, because it doesn't. In fact, its pretty messy to look at all those tags and angle brackets.

If your not familiar with Nant, you can get familiar at this sourceforge site: http://nant.sourceforge.net

XML makes Nant cool because of the power of the transform. Being able to easily generate Nant build files using Xslt has benefited me again and again. Because C# project files are in an XML format, its no sweat to run a .csproj file through an Xslt and have it output a Nant build file with source files, references and anything else all intact. I have an application in development now that has several projects getting updated daily by various developers. Being able to generate new build files off of their recent changes saves a lot of time.

However, I've gotten to the point where I'm considering generating the files that generate my build files (yeh, two layers of generation). It appears to be the one way I can refactor the whole thing to make it easier to add projects to the process. Currently, there are three steps. 1) Get from source control 2) Generate build files 3) Build the application. We'd also like to have a fourth step to automatically deploy the application to a test server. The way its setup now, we have to add a project to each stage. My thought is to start out with a simple XML file with a list of the projects and generate the rest.

All this makes me wonder what patterns (not tools) are out there for structuring the build files for Nant. Any comments on how Msbuild will make organization of a large number of build projects easier?

Posted on Thursday, August 19, 2004 1:53 AM .NET | Back to top

Copyright © Drew Robbins | Powered by: GeeksWithBlogs.net