Oct 26, 2021
Thanks for the article.
The dotnet test CLI command can be used to generate code coverage reports in opencover and cobertura at the same time.
dotnet test '**/src/Tests/**/*.csproj' --configuration $(buildConfiguration) --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=\"cobertura,opencover\" /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/
Above command generates 2 coverage report files
coverage.cobertura.xml
coverage.opencover.xml
This way, Step2 of converting the opencover to cobertura using reportgenerator tool can be skipped.