Cannot report dotCover results when executing build with .NET CLI (dotnet msbuild)
We use MSBuild to automate the whole build process of our ASP.NET Core application. During the build process, we use dotCover (2018.1) to measure the test coverage. The coverage results are stored in a special folder in the output folder. Until here, everything works fine and I can check the coverage files after a build.
As soon as dotCover has finished, we report the results to TeamCity with the following statement:
<Message Text="##teamcity[importData type='dotNetCoverage' tool='dotcover' path='$(CoverageOutputFile)']" Importance="High" Condition="Exists('$(CoverageOutputFile)')"/>
In the build log I can see the corresponding message, but TeamCity does not read those files. I do not see an entry like:
[Step 1/1] Importing data from 'C:\BuildAgent\work\ca675f5369ba7931\artifacts\logs\Coverage\Erowa.MultiCell.Domain.Test.coverage' (290.66 KB) with 'dotNetCoverage' processor
When I change the runner type in TeamCity to 'MSBuild' everything works fine and I see the coverage results after the build. Is this a known issue?
Regards,
Martin
Please sign in to leave a comment.
Hi Martin,
could you please use the "Submit a request" button on top and send us the full build log for review?