Additional Functionality in MSBuild Scripts
 |
Be sure to replace "." with "_" when using properties in MSBuild scripts. That is you have to use teamcity_dotnet_nunitlauncher_msbuild_task instead of teamcity.dotnet.nunitlauncher.msbuild.task |
NUnit and NUnitTeamCity tasks
TeamCity provides additional functionality with its own NUnit and NUnitTeamCity tasks for build runners that use MSBuild scripts.
 | 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 agent specific properties for more information. |
The NUnit/NUnitTeamCity task uses the following syntax:
<UsingTask TaskName="NUnit" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />
The NUnit/NUnitTeamCity task tests .NET Assemblies with NUnit. Add the following code to your target in MSBuild script to implement it:
<NUnitTeamCity Assemblies="@(assemblies_to_test)" />
This NUnit task is automatically included in MSBuild and Solution2005 and Solution2008 builds.
 | 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. |