I've tried all I can find to figure this out.
I have several fresh .net core 3.1 or .net standard 2 projects that are building on Azure DevOps Services. I'm trying to setup the code coverage for these projects and I'm getting nowhere.
When running a test locally I get a success and the code coverage result is created.
3/24/20 3:39 [jgust] [portChangesFromAggregateRepo ≡]
>: dotnet test .\Common.UnitTests\ --collect:"Code coverage"
Test run for C:\src\bio\lib\Common\src\Common.UnitTests\bin\Debug\netcoreapp2.2\Common.UnitTests.dll(.NETCoreApp,Version=v2.2)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Attachments:
C:\src\bio\lib\Common\src\Common.UnitTests\TestResults\74f826e4-4a46-46dd-9fe5-7fd17b8cee1c\2020-03-24.15_40_28.coverage
Test Run Successful.
Total tests: 794
Passed: 794
Total time: 19.3390 Seconds
However, when running this project on Azure DevOps, the build reports that the collector can't be found.
A total of 1 test files matched the specified pattern.
Data collection : Could not find data collector 'Code coverage'
Results File: d:\a\_temp\VssAdministrator_fv-az130_2020-03-24_20_53_07.trx
Test Run Successful.
Total tests: 794
Passed: 794
The pipeline task for this is as follows:
and yes I'm using windows platform here
What am I missing about setting up code coverage collection for these projects.
As far as I can tell, I'm going everything strait out of the book
Also, I am using the described version of package:
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />

