NUnit for MSBuild
note
In order for these tasks to work the
teamcity_dotnet_nunitlauncher
system property have to be accessible. Build Agents running windows should automatically detect these properties as environment variables. If you need to set them manually, see defining Properties of a Build Configuration properties for more information.
tip
TeamCity uses its own version of NUnit task for running NUnit tests. TeamCity version is compatible with the
MSBuild Community Task
and will issue a warning, if TeamCity does not support an attribute listed in the build script. These warnings are only for your information and will not affect the building process.
note
In TeamCity 4.5,
ExitCode
output attribute is added to the <NUnit> task. Exit code is '0', if there were no crashes and runner exceptions. Otherwise non-zero exit code is returned.
note
Be sure to replace "." with "_" when using Properties of a Build Configuration in MSBuild scripts. That is you have to use
teamcity_dotnet_nunitlauncher_msbuild_task
instead ofteamcity.dotnet.nunitlauncher.msbuild.task
TeamCity also provides Solution 2005 Runner for Microsoft Visual Studio 2005 solution files. It allows you to use MSBuild-style wildcards for the assemblies to run unit tests on.
Thanks for your feedback!