dotCover doesn't work with msbuild and nunit task


If I understand correctly ( dotCover should work just fine if I use msbuild nunit task to run my tests?
The tests gets run but I see no test coverage and no mention of dotCover in the log.

This is how I do it:

<Target Name="RunUnitTests">
      <TestAssemblies Include="$(ProjectTestDir)\*.UnitTests.dll" />
    <NUnit Condition="'@(TestAssemblies)'!=''"
           Assemblies="@(TestAssemblies)"  DisableShadowCopy="true" ToolPath="$(NUnitDir)"
           OutputXmlFile="$(ProjectTestDir)\$(TestResultFileName)" />

And this is howI the build is configured:


1 comment
Comment actions Permalink

Hi Pawel

To get coverage and real-time test results TeamCity uses it's own version of NUnit task
You'll need to attach it using

<UsingTask TaskName="NUnit" AssemblyFile="$(teamcity_dotnet_nunitlauncher_msbuild_task)" />

See details at NUnit for MSBuild page.


Please sign in to leave a comment.