I've setup a MSBuild file with several targets.
In one of the target I am calling
<Exec Command="$(teamcity_dotnet_nunitlauncher) v4.0 X86 NUnit-2.5.9 @(UnitTestDlls)"/>
where @(UnitTestDlls) is a group of items containing the DLL I want to unit tests. I do it this way since from the web interface I cannot dynamically build a list of DLL to unit test.
Anyway, this is working fine but now I would like to add coverage analysis with DotCover.
In the past we used PartCover as follows:
<Exec Command="$(teamcity_dotnet_nunitlauncher) v4.0 X86 NUnit-2.5.9 @(UnitTestDlls) /partcover:%22$(PartCoverConsole)%22 /partcover-arguments:%22--register --output $(PartCoverXmlOutputFile) --include [*]* --exclude [Accessibility]* --exclude [*]Microsoft* --exclude [*test*]* --exclude [*Test*]* --exclude [*JetBrains*]* --exclude [*nunit*]* --exclude [*log4net*]* --exclude [*CookComputing*]* @(ExternalLibraries->'--exclude [%(Filename)]* ','')%22"/>
and it was working great.
I tried changing the /partcover argument to /dotcover but it would seem that the launcher does not support arguments for dotcover !