Child pages
  • .NET Support
Skip to end of metadata
Go to start of metadata


.NET Support for Bamboo



Product Versions



Ross Rowe









Subversion URL

or browse via fisheye

Download JAR

nant_builder-1.0.5.jar (supports 1.2.x)/nant_builder-2.1.4.jar (supports 2.0.x)/nant_builder-2.1.17.jar (supports 2.1.x and higher)

Download Source


A builder plugin that will allow configuration and execution of build files for .Net/Mono projects,
using NAnt, Msbuild and devenv and also supports the parsing and displaying of NUnit, MBUnit and MSTest test results

This plugin will allow you to configure a single Bamboo instance handle building both your Java and .Net projects, which is especially useful if you have multi-discipline teams in your organization.

Upgrading to Bamboo 2.1 and 2.2

If you're upgrading to Bamboo 2.1 or 2.2, then you will also need to upgrade the NAnt Builder plugin to the latest version.


In order to use the NAnt Builder, you must first install NAnt, which can be obtained from In addition, you will also need to install an
appropriate version of the .Net framework, which can be downloaded from or the Mono framework, which can be downloaded from

This plugin has been tested using .Net Framework v2.0 on Windows XP and Mono v1.2 on OS X using both Bamboo v1.2.x and v2.0.x If you encounter any difficulties with this builder on other platforms, please let me know and I'll endeavor to resolve the issue.



Copy the nant_builder-2.1.16.jar file into your <BAMBOO_HOME>/webapp/WEB-INF/lib directory and restart Bamboo. Please note that nant_builder-2.X.X.jar supports Bamboo 2.x, and the nant_builder-1.X.X.jar supports Bamboo 1.x.

Make sure that any older versions of the plugin are removed first!


  1. Create a new NAnt Builder via the Builders tab on the Administration page. You should be able to select NAnt as a builder type, you will need to enter a label and include the location to the path to the NAnt directory.
  2. Once you have created a NAnt Builder, you can configure a project to use this builder via the Builder Configuration tab of the Configuration page. Here you can specify the name of the build file, the target to execute, NAnt options, environment variables, and the working sub directory.


  1. If your build produces NUnit, MBUnit and/or MSTest test results, then enter the location of the test result files on the Builder Configuration tab.

The builder will run in the same manner as the Ant and Maven builders ie. the build output will be captured by Bamboo and displayed on the Build Log page. A build will be deemed 'successful' (and thereby appear in the shiny green colour) if the NAnt build finishes with a return code of 0 and if the last 5 lines of the NAnt build include the words 'BUILD SUCCEEDED'. In addition, if the build has been configured to run NUnit tests, a build will be deemed successful if all the tests pass. If any of these conditions are not met, then the build will be deemed to have 'failed'.

A builder as well, which works in the same sort of way as the NAnt Builder and includes the support for parsing and recording NUnit test results. The executable is included as part of Microsoft Visual Studio and allows you to build a Visual Studio Solution from the command line.

You first need to add the Builder via the Administration page

Once the builder has been added, you can use this builder in your build's Configuration.


Similar to the devenv builder, support for Msbuild has also been included.

.NET Script/Command builds

Generic .NET Script and Command builders are included also. These builders allow you to specify a custom command or script to be used as part of a build's execution, but which allow the parsing and displaying of NUnit/MBUnit test results.


If your build produces NCover coverage files, then enter the location of the coverage result files on the Builder Configuration tab. Bamboo will then parse and display the NCover results when each build runs.

Jira Issues

The following lists the reported defects and enhancements that have been reported. If you encounter a defect, or if there is a feature that you'd like added to the builder, feel free to raise an issue at the Jira site, or drop me an email at

type key summary reporter status

Data cannot be retrieved due to an unexpected error.

View these issues in Jira

Version History

Version 2 (supports Bamboo 2.x)





14 Dec 2009

Ensure that NCover processing is not performed if build was unsuccessful


12 Sep 2009

NANT-23 Include the class name in the MSTest output


3 Sep 2009

NANT-24 Ensure that arguments containing quotes get retained when commands are executed


5 Aug 2009

NANT-22 Ensure NCover parser is i18n compliant


8 Jul 2009

NANT-19 Included support for parsing MSTest result files


19 May 2009

NANT-18 Ensure environment variables are correctly parsed


18 Feb 2009

NANT-15 Include messages in the build log to indicate if tests were not found


12 Feb 2009

NANT-14 Fixed line rate appearing in incorrect format


5 Feb 2009

Removed XSL transformations for presenting MBUnit results for the time being


4 Feb 2009

Fixed NullPointerException which occurred when processing NUNit results. Updated presentation of errors/failures for MBUnit results


11 September 2008

Updated plugin to support Bamboo 2.1


29 July 2008

Interim fix to BAM-2933 to allow replacement of predefined environment variables. Further details here


7 July 2008

Ensure that default values don't overwrite entered configuration


19 June 2008

Fixed some parsing issues of NCover reports


17 June 2008

NANT-10 Added initial support for NCover results


8 June 2008

Updated code to use correct mechanism to retrieve working directory


27 May 2008

Added ability to set specific directory containing test results - this was causing problems for users with Perforce repositories


22 May 2008

NANT-9 Command Builder arguments were disappearing


17 May 2008

NANT-8 Included support for msbuild.exe


17 May 2008

Added a Command Builder that handles parsing of NUnit and MBUnit result files


16 May 2008

NANT-7 Included support for MBUnit results

Version 1 (Supports Bamboo 1.2.x)





17 May 2008

NANT-8 Included support for msbuild.exe


21 April 2008

Added a new Script builder that handles parsing of NUnit results (this has also been included in 2.0.3


24 January 2008

NANT-4 Fixed test results directory being overridden on the Edit Configuration page


4 October 2007

NANT-3 Ensure Category and Categories elements are handled correctly


12 May 2007

Final version for submission


12 May 2007

Added a devenv builder


3 May 2007

NANT-1 Pass through 'BambooBuildLabel' property to NAnt


30 April 2007

Added support for parsing/displaying NUnit results


29 April 2007

Initial stable version



  1. Hi Ross,

    Good to see someone's looking at doing this! My biggest feature suggestion is that you pass through the build label as a property to NAnt so that projects can use this to create the correct dll version. We do this in CCNet, then projects can use NAnt's <asminfo> task to create the version number.

    If in doubt, also look at CCNet's Nant builder docs ( .

    I'm not doing .NET right now but if you'd like to throw some ideas at me shoot me a mail (my email address is a link on my blog at

    Mike (ex- CCNet Project lead)

    1. Hi Mike, thanks for the suggestion, I'll definitely have a crack at including this feature!



      1. Just FYI, I've put up a new version that passes the build label in a 'BambooBuildLabel' parameter to NAnt.



  2. Excellent! Just what we've been looking for! At least the NUnit tests part, which brings me to a question. A request, actually.

    We use a custom builder that just calls VisualStudio's app to do commandline builds. Is there any possible way the NUnit tests parser thingy could be utilized in non-Nant builds?

    It's easy enough to wrap our debug builds in Nant, but it would be cool to be able to use NUnit tests in arbitrary builds (with arbitrary builders.)

    Thanks for making this plugin! Extremely useful!

    1. Hi Matthew, thanks for your feedback and suggestion. The NUnit results parsing logic is invoked from the NAnt Builder itself, but I'd imagine it would be pretty easy to create a devenv Builder that would build the appropriate command line to execute and which would also locate and parse NUnit results in a similar manner to the NAnt Builder. I can have a crack at adding a devenv Builder and I'll let you know when I've got something that you can try out. Feel free to drop me a line at piaross at gmail dot com if you'd like to discuss it further.



  3. It might be just that I'm dumb, don't understand Ant/Nant paths, etc, but is there a way to include NUnit results files that are outside of the build root? I need to go up about three directories and back down into another tree to get the .xml our NUnit tests generate but I can't for the life of me figure out the syntax.

     I guess I could easily just have the build script copy it where I want it, but that seems less elegant to me, and you know, appearances count. (smile)

     Thanks! Love this plugin/functionality!

    1. Hi Matthew, I haven't extensively tested it, but you should be able to configure the test location to do what you want. The NAnt Builder uses the test results location with respect to the source directory (ie. where the code has been checked out to). However, if you specify a directory (instead of a specific NUnit xml file or even *.xml), then the builder will search for all .xml files residing in that directory. So, if you have '../../../test/results', then so long as that path is navigatable from the build source directory, the NAnt Builder should process all the .xml files in that directory.



  4. Ross,

    Where can I find sources of 2.1.5 version, because the last subversion activity is tagging 2.1.3?

    r20673 | rrowe | 2008-07-07 11:13:35 +0200 (Mon, 07 Jul 2008) | 1 line
    Tagged 2.1.3 release of Bamboo NAnt plugin

    I would like to analyse the sources in order to make sure that after my fix for the plugin behaves correctly.


    1. Hi Lucas, sorry, I'd forgotten to check my changes in. Everything is committed now, and I've moved the latest code back into the trunk folder (it was previously in branches/bamboo_2.0)



      1. No problem at all. I'll take a look at it. Thanks,