Jul 202009

What is NAntBuilder? (Excerpt from NAntBuilder Website)

NAntBuilder is a full-featured Integrated Development Environment (IDE) for NAnt, the popular process-automating tool. It is designed to be a powerful NAnt script creator, editor, and debugger.

NAntBuilder enables you to manage your build process easily, allowing you to focus on more interesting and important works. Its full-featured code completion will save you thousands of keystrokes while authoring NAnt script. And the integrated NAnt script debugger will help you execute NAnt script task by task. With all these features, NAntBuilder provides a flexible, easy-to-use platform to author, debug and execute NAnt script.

The Review

While I was researching ways to help implement automated builds using NAnt, a colleague of mine ran across this tool and passed the information on to me for evaluation. We were still in the early stages of planning a new automated build process and there were some inherent risks with regard the learning curve for NAnt scripts to support the new process. For many developers who specialize in managed code (like .Net) with fully supported frameworks and object oriented design, using scripting technologies and being forced to think in a more procedural design can be difficult. Not to mention, scripting technologies often don’t have good tool support for design, coding, and debugging. So, while there were no specific initial requirements for a development tool for NAnt scripts in our project scope, NAntBuilder appeared to be a good addition to help mitigate certain project risks associated with the learning curve factors.

IDE Layout and Features

NAntBuilder provides and MDI interface to allow for editing multiple scripts with both a design view and a code view that allow the developer to attack each script visually or directly. The visual design interface offers the standard drag-and-drop features where you can drag script tasks from the tools pane to insert them into the script or rearrange tasks within the script flow as needed. The code view provides code completion and syntax highlighting features as one might expect and also ties to the outline view (in the properties pane) that resembles the Ant script outline available in Eclipse.

On the left of the standard layout, you’ll find the tools pane which is well organized with groups of related tasks in collapsible regions. Unused tasks, such as those specific to a source control system you don’t use, can be removed (hidden) from the tool pane using options within the IDE. All NAnt core tasks are included in the tools pane and custom tasks are also available in the tool pane if they are included in the NAnt->Extension configuration of the IDE and scanned accordingly. The grouping for the NAntContrib tasks are already setup, and in a forum discussion with the NAntBuilder developers, I found that there is a (yet undocumented) way to group your own custom NAnt tasks in the tool pane as well.

On the right side of the standard layout you’ll find a familiar properties pane that allows you to drill down into the properties for the selected task. One of the “coolness” factors is the intellisense build into the property fields. For many of the properties, if there is a value for selection that can be logically reference, they are displayed as options as you begin to type into the property field. For example, a property that expects a path for a value will show possible options when you begin to type “C:\” or “.\”, based on the local file system. The properties window is only available in the design view and will be empty (blank) when in code view, but the code completion in code view should make up for the inconvenience. Also, the outline window is only available in code view and will be empty when in design view, but since the design is the hierarchical structure, the outline view would not provide any additional benefit there.

Another familiar element to the interface, which is available both in design and code view, is the pane at the bottom of the layout which includes windows for standard output, watch list, call stack, and errors. The output window displays the standard out from the NAnt process as it would appear in a command window, but with some highlighting to help identify different output elements. From design view, you can drag “property” tasks to the watch list (or type the variable name directly) while stepping through the code in debug mode to evaluate its value in real-time. The call stack window is also useful in debug mode as well if you have a module structure to your build script process.

For screenshots of the IDE, view the screenshots page on the NAntBuilder site.

Debugging in NAntBuilder is fairly standard as well and is triggered by setting a break point in either the design or code views. The break points can be set by simply clicking the left margin area, which then will indicate the break point with a red marker. You then run the build in NAntBuilder, and when it stops on your breakpoint you can step into (or over) each task in the script using the defined hotkeys. The only (important) debug feature I found missing is the ability to break on error as you would in Visual Studio, but that feature has been requested so we might see it in a later release.

I could go on and on about the specific features that make NAntBuilder a great tool, but it’s probably best if you download the 30 day trial version and do your own evaluation. For a comprehensive list of features, take a look at the features page on the NAntBuilder site.

The Wrap Up

Just a few more points I wanted to make before wrapping up this review. First, while I was evaluating NAntBuilder for my project, I had the opportunity to communicate with the developers directly in their forum on the site. I was very impressed with their response times to any inquiry I made, whether it was a bug report or feature request. In some cases of bug reports, they had the code updated, tested, packaged, and available for download within a day or two. This kind of service is not typical from my experience, and it is much appreciated.

Finally, when it came to the decision to purchase NAntBuilder for our project requirements, the cost made it a very easy sell for our management team. At the time of this article, the site license is $599.95 (US dollars) which is a very minor expense when you consider the advantages the tool offers. So if you’re looking at visual build tools, like Final Builder, Visual Build Pro, or Automated Build Studio, add the NAnt & NAntBuilder combination to your product evaluation as well and you may discover a very affordable solution that meets your build requirements.

 Posted by at 11:10 am