1

I find some people are trying to build their project by NAnt instead of the VS GUI. Is there any advantage that NAnt is better than GUI? Do you have any experience on it?

Best Regards,

Yongwei Xing
  • 12,983
  • 24
  • 70
  • 90
  • Wouldn't NAnet vs MSBuild be a more obvious comparison? – Brian Rasmussen Jul 07 '11 at 08:58
  • possible duplicate of [What are the benefits of using NAnt instead of MSBuild?](http://stackoverflow.com/questions/6602496/what-are-the-benefits-of-using-nant-instead-of-msbuild) – skolima Jul 07 '11 at 09:56

2 Answers2

3

If your project's build process involves more than just compiling the sources, a build tool such as NAnt will allow you to customize and extend that process to do just about anything.

An example of a build process could be:

  1. Run static analysis on the source code
  2. Compile
  3. Run all unit tests
  4. Create deployment package
  5. Publish deployment package to a network location

Automating this kind of process using the Visual Studio UI alone can be quite challenging.

I should point out that Visual Studio itself uses a build tool internally to do its job called MSBuild. MSBuild is architecturally very similar to NAnt and has the advantage of being built right into the .NET Framework.
The choice between MSBuild and NAnt should be made considering what the two tools have to offer versus what your specific needs are.

Community
  • 1
  • 1
Enrico Campidoglio
  • 56,676
  • 12
  • 126
  • 154
2

There are a number of reasons to use Nant.

The simplest, and I guess most often used reason is that you may want to setup an automated build script (for example on a build machine devoted to creating the latest build).

Nant is also platform independent so you are not tied to windows.

There's a similar question here which may give you more info. too.

Community
  • 1
  • 1
NotJarvis
  • 1,267
  • 11
  • 17