Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Introducing Nant

Nant is a .NET application that is directed by an XML file to execute build or command-line tasks. The Make tool, which has been around for a long time, performs a similar role. The flexible nature of XML, coupled with Nant's extensibility, makes it a worthy successor to Make. You can use Nant to run any command-line task, but it comes into its own when you put it to work integrating your software. One important point to note: Nant is not a direct replacement for Ant. Ant has a much longer list of built-in and optional tasks; it can even be used to compile .NET applications. It does fall down when it comes to native VB.NET support, but it does offer C# Visual Source Safe and SQL tasks. Nant is still useful if you're running in a Java-free environment and it seems faster, too.

The general steps involved in building software are illustrated in Figure 2.

Figure 2Figure 2 The software development build process.

Before you start automating your build, you must ensure that ALL of your source code and supporting libraries are under version control; Visual Source Safe, CVS, etc. And at the risk of pointing out the obvious—back up your source repository.

With Nant, we extract source, building on a clean or pristine machine. This build or integration machine serves only one purpose: running the automated build. My advice is to always use a separate physical machine for this rather than putting your trust in virtual hosting options like Virtual PC. Your clean box will have the base operating system patched to the relevant level, .NET, Nant and any other client access software (for example, Source Safe). You shouldn't need to install Visual Studio.NET, and doing so would result in a very dirty "clean" machine. (The compilers come with the .NET Framework.)

Visit SourceForge at to download the latest version of Nant.

  • + Share This
  • 🔖 Save To Your Account