dotCover and xUnit no results on build server

When build my .net solution via Visual Studio 2017 and then running dotcover.exe I get correct results and all assemblies are included in the dotcover result (dcvr file).

CMD:

c:\dotcover\dotCover.exe c c:\mysolution\dotCover-xunit.xml

 

Xml:

<?xml version="1.0" encoding="utf-8"?>
<CoverageParams>
<TargetExecutable>
c:\dotcover\xunit\xunit.console.exe
</TargetExecutable>
<TargetArguments>
"INWK.Configuration.UnitTests.dll"
</TargetArguments>
<TargetWorkingDir>
..\bin\x64\Debug\
</TargetWorkingDir>
<TempDir>
<!-- Directory for auxiliary files. Set to the system temp by default. -->
</TempDir>
<Output>
dotCover-xunit.dcvr
</Output>
<InheritConsole>
<!-- [True|False] Lets the application being analyzed to inherit dotCover console. True by default. -->
</InheritConsole>
</CoverageParams>

 

You can see (Service, Shared, UnitTests assemblies correctly included in the test coverage report)

 

However, when running the same on the build server I only see UnitTests assembly in the result:

 

After replacing Service.dll and Shared.dll and their "pdb's" from local copy to build server and running dotCover on build server again it works correctly. This leads me to believe that build server runner does something different than msbuild.exe from VS when running build locally.

I found very similar issue description here: https://stackoverflow.com/questions/25855131/dotcover-and-xunit-not-gathering-coverage-statistics-in-some-environments, but not sure how to remedy this in my build server configuration.

 

Can anyone please help?

Here is link to trace log (onedrive): https://1drv.ms/t/s!AtxuuqGHIqXwgTVqQJ_Y_-rGE8W9?e=HrZgj7

 

Please sign in to leave a comment.