TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

NAnt

Last modified: 20 April 2023

TeamCity supports NAnt starting from version 0.85.

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 package msbuild 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).

By default, NAnt msbuild task checks for current value of NAnt target-framework property to select MSBuild runtime version. This parameter could be overriden by setting teamcity_dotnet_tools_version project property with required .NET Framework version, i.e. "4.0".

... <!-- this property enables MSBuild 4.0 --> <property name="teamcity_dotnet_tools_version" value="4.0"/> <msbuild project="SimpleEcho.v40.proj"> ... </msbuild> ...

<nunit2> Task for NAnt



To test all of the assemblies without halting on first failed test please use:

<target name="build"> <nunit2 verbose="true" haltonfailure="false" failonerror="true" failonfailureatend="true"> <formatter type="Plain" /> <test haltonfailure="false"> <assemblies> <include name="dll1.dll" /> <include name="dll2.dll" /> </assemblies> </test> </nunit2> </target>

Below you can find reference information about NAnt Build Runner fields.

General Options



Code Coverage



To learn about configuring code coverage options, please refer to the Configuring .NET Code Coverage page.

|Build Checkout Directory | Build Working Directory Administrator's Guide: Configuring Build Parameters