Mark Gilbert's Blog

Science and technology, served light and fluffy.

NAntRunner 0.4 Released

Meet the new kid

I just released NAntRunner 0.4, now available at Upgrading to the new version is easy. Simply download the 0.4 ZIP, and extract it to the folder with your previous installation of NAntRunner (your existing settings will be preserved). There were three main things I wanted to tackle in this release. I ended up doing four.

First, I replaced the treeview controls with a user control that rolls everything up. This user control actually started out life in another one of my tools – IISTweak – and I had always intended to incorporate it into NAntRunner. When I did that I realized I had some more work to do to get it closer to being generic. I don’t think the control is completely baked yet, but it’s definitely closer.

For those of you who download the source code and want to tinker, I found an interesting quirk with Visual Studio 2008 and this update. The new user control is called NavigationTree, and it is part of the NAntRunner assembly (the executable). If you do anything with the control in the designer mode on the Main form, Studio updates the instantiation of this control in Main.Designer.vb file to read as follows:

Me.MainNavigationTree = New NAntRunner.NavigationTree

That, however, causes a compile-time error. If you remove the “NAntRunner” assembly reference so it reads as follows:

Me.MainNavigationTree = New NavigationTree

Then the compiler is happy again. Sigh. It’s the little things that cause the grey hairs.

The second update was to add a checkbox that will add the -verbose switch to the NAnt call. As you’d expect, the additional messages generated will appear in the NAntRunner progress window. In previous version of NAntRunner, you could include this yourself using the “Other NAnt Args” box, but having a checkbox feeds my lazy side.

Third, I added the ability to reorder scripts within a group and moving scripts from one group to another – all via drag and drop. I found myself having to scan down through the groups looking for the right script more and more recently, and really wanted to be able to move the more commonly used ones to the top of the list. In the past you could always hack the NAntRunnerSettings.xml file to manually reorder these, but this is much more intuitive. Reordering entire groups and their contents isn’t available at this time.

The one item I didn’t plan on but ended up doing was reworking how the standard output and error messages were retrieved from the spawned NAnt process. Previously it was done at the end, once the NAnt task had completed. Version 0.4 does this asynchronously via event handlers – as the messages are generated. The reasons why and the details of the implementation will be a subject for a future post.

The future

I started thinking about what would define the 1.0 release. My goal with NAntRunner has always been to provide easier access to the common features of NAnt. I think it’s almost there. I may extend the “verbose” checkbox into a “message level” control (perhaps a slider) so NAntRunner has native support for the -verbose, -debug, and -quiet switches. I’ve also thought about adding logging support (using the -logger switch). Finally, I may extend the interface to allow you to save the NAntRunner configuration settings used for a given build script so that the next time you open that script NAntRunner will configure itself accordingly (saving you a few clicks and keystrokes).

Minimally, I’ve dropped several TODOs in the code for things that I need to get back to. Since many of these involve error handling, these are a must for version 1.0. If you can’t rely on your tools then you need better tools.

Enjoy the new release, and let me know what you think.

September 4, 2009 - Posted by | Tools and Toys

Sorry, the comment form is closed at this time.

%d bloggers like this: