When selecting NAnt as the build runner, you need to specify the NAntHome environment variable on the agent machine with a path to the NAnt 0.85/0.86 beta 1 executables folder. This can be done by setting the environment variable on agent machine or by adding the env.NAntHome variable to the agent properties file or during the Properties and Environment Variables step when creating a build configuration.
note
Please note that the variable name is case sensitive.
MSBuild Task for NAnt
TeamCity NAnt runner includes a task called msbuild that allows NAnt to start MSBuild scripts. TeamCity msbuild task for NAnt has the same set of attributes as the NAntContrib packagemsbuild task. The MSBuild build processes started by NAnt will behave exactly as if they were launched by TeamCity MSBuild/SLN2005 build runner (i.e. NUnit and/or NUnitTeamCity MSBuild tasks will be added to build scripts and logs and error reports will be sent directly to the build server).
note
msbuild task for NAnt makes all build configuration system properties available inside MSBuild script. Note, all property names will have '.' replaced with '_'. To disable this, set false to set-teamcity-properties attribute of the task.
By default, NAnt msbuild task uses MSBuild 2.0 (from Microsoft .NET Framework 2.0), however you can use MSBuild 3.5 (from Microsoft .NET Framework 3.5) if you add the teamcity_dotnet_use_msbuild_v35 property with the value of true to your msbuild task in NAnt script. For example:
'failonfailureatend' attribute is not defined in the original NUnit2 task from NAnt. Note that this attribute will be ignored if the 'haltonfailure' attribute is set to 'true' for either the nunit2 element or the test element.
Below you can find reference information about NAnt Build Runner fields.
Select the option, if you want to use a different build script than the one listed in the settings of the build file. When the option is enabled, you have to type the build script in the text area.
Targets
Specify the names of build targets defined by the build script, separated by spaces.
Here you can specify an absolute path to the NAnt.exe file on the agent, or a path relative to the checkout directory. Such relative path allows you to provide particular NAnt.exe file to run a build of the particular build configuration.
Target framework
Sets -targetframework: option to 'NAnt' and generates appropriate agent requirements (mono-2.0 target framework will require Mono system property, net-2.0 — DotNetFramework2.0 property, and so on). Selecting unsupported in TeamCity framework (sscli-1.0, netcf-1.0, netcf-2.0) won't impose any agent requirements.
warning
This option has no effect on framework which used to run NAnt.exe. NAnt.exe will be launched as ordinary exe file if .NET framework was found, and through mono executable, if not.
Use following option to instruct TeamCity to run some tests before others.
Run recently failed tests first
If checked, in the first place TeamCity will run tests failed in previous finished or running builds as well as tests having high failure rate (a so called blinking tests)