TeamCity On-Premises 2021.1 Help

NUnit Addins Support

NUnit addin is an extension that plugs into NUnit core and changes the way it operates. Refer to the NUnit addins page for more information. This section covers description of NUnit addins support for:

NAnt Build Runner

To support NUnit addins for NAnt build runner you need to provide in your build script the teamcity.dotnet.nant.nunit2.addins property in the following format:

<property name="teamcity.dotnet.nant.nunit2.addins" value="<list of paths>" />

where <list> is the list of paths to NUnit addins separated by ;.

For example:

<property name="teamcity.dotnet.nant.nunit2.addins" value="../tools/addins/MyFirst.AddIn.dll;MySecond.AddIn.dll" />

TeamCity NUnit Console Launcher

To support NUnit addins for the console launcher you need to provide the /addins:<list of addins separated with ;> command line option.

For example:

${teamcity.dotnet.nunitlauncher} /addin:../tools/addins/MyFirst.AddIn.dll;nunit-addins/MySecond.AddIn.dll


This section is applicable to NUnit versions prior to 3.0.

To support NUnit addins for the MSBuild runner, specify the Addins property for the NUnitTeamCity task with the following format:


where <list> is the list of addins separated by ; or ,.

For example:

<Project xmlns="" DefaultTargets="build"> <ItemGroup> <TestAssembly Include="$(MSBuildProjectDirectory)/MyTests.dll" /> </ItemGroup> <Target Name="build"> <NUnitTeamCity Assemblies="@(TestAssembly)" Addins="../tools/addins/MyFirst.AddIn.dll;nunit-addins/MySecond.AddIn.dll" /> </Target> </Project>
Last modified: 23 July 2020