NAnt2

NAnt2 is a free .NET build tool, updated and enhanced from original NAnt project https://github.com/nant/nant. Easy to use even by non-programmers to automate their daily tasks.

3
2
C#

NAnt2

Let’s chat Join the chat at https://gitter.im/NAnt2/NAnt2

  • NAnt2 build Build status

Maintainability Rating Coverage
CodeScene general

What is it?

NAnt2 is an updated and enhanced fork of NAnt - a .NET-based build tool and NAnt.Contrib - NAnt extension.

It is intended as a drop-in replacement of NAnt, and it is licensed as free and open-source software under the GNU General Public License.

Why NAnt2?

Because people still use it and because it still works great, even if the last release was long time ago (on 9th June 2012).

License

NAnt2 is provided under included GPL license. Portions of it (NAnt2.Contrib) are provided under included LGPL license.
There is an effort to change license to Apache 2.0 / MIT. If you ever contributed to NAnt, NAnt.Contrib or NAnt2, please state your approval/disapproval on ticket #14

NAnt and NAnt.Contrib

What is NAnt?

In theory it is kind of like make without make’s wrinkles. In practice it’s a lot like Ant.
If you are not familiar with Jakarta Ant you can get more information at the Ant project web site.

Why NAnt?

Because Ant was too Java-specific.

Because Ant needed the Java runtime. NAnt only needs the .NET or Mono runtime.

The Latest Version

Files

File Purpose
README.md/txt This file
Makefile Makefile for compilation with GNU Make
Makefile.nmake Makefile for compilation with Microsoft NMake

Compilation and Installation

  • Windows (net-2.0): TeamCity CodeBetter
  • Windows (mono-2.0): TeamCity CodeBetter
  • Linux: Travis-ci.org
    Overview

The compilation process uses NAnt to build NAnt.

The approach is to first compile a copy of NAnt (using make/nmake) for
bootstrapping purpose. Next, the bootstrapped version of NAnt is used in
conjunction with NAnt build file (NAnt.build) to build the full version.

Prerequisites

To build NAnt, you will need the following components:

Windows

  • A version of the Microsoft .NET Framework.

    Available from http://msdn.microsoft.com/netframework/

    You will need the .NET Framework SDK as well as the runtime
    components if you intend to compile programs.

    Note: NAnt currently supports versions 1.0, 1.1, 2.0, 3.5, and 4.0
    of the Microsoft .NET Framework.

or

Linux/Unix

Building the Software

Build NAnt using Microsoft .NET:

  • GNU Make

      make install MONO= MCS=csc prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
    

    eg. make install MONO= MCS=csc prefix="c:\Program Files" TARGET=net-4.5

  • NMake

      nmake -f Makefile.nmake install prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
    

    eg. nmake -f Makefile.nmake install prefix="c:\Program Files" TARGET=net-4.5

Building NAnt using Mono:

  • GNU Make

      make install prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
    

    eg. make install prefix="c:\Program Files" TARGET=mono-4.5 MCS="mcs -sdk:4.5"

  • NMake

      nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=<installation path> [DESTDIR=<staging path>] [TARGET=<nant target>]
    

    eg. nmake -f Makefile.nmake install MONO=mono CSC=mcs prefix=/usr/local/

Note: These instructions only apply to the source distribution of NAnt, as the
binary distribution contains pre-built assemblies.

Documentation

Documentation is available in HTML format, in the doc/ directory.

License

NAnt is provided under included GPL license.
NAntContrib is provided under included LGPL license.
NAnt Copyright © 2001-2012 Gerry Shaw
NAntContrib Copyright © 2002 Tomas Restrepo ([email protected])

Contributors

NAnt2 (2018 - present day)

NAnt (2001 - 2018)

Lead Developers

Developers

Contributors

…And more, please see list archives for additional contributors

NAntContrib (2003 - 2018)

Lead Developers

Contributors

  • Dominik Guder
  • Clayton Harbour
  • Richard Birkby
  • Nikhil Gupta
  • Bryce