Search code examples
visual-studionant

Why do we use the NAnt instead of the VS GUI?


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,


Solution

  • 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.