coverlet: coverlet.msbuild 2.8.0 does not combine coverage when using MergeWith

Dependabot pushed a number of updates to coverlet.msbuild to repositories I maintain just now to bump from 2.7.0 to 2.8.0, and for projects where code coverage is aggregated together using the MergeWith MSBuild property, the stats are no longer being combined.

Here’s such an example PR: https://github.com/justeat/httpclient-interception/pull/171

This is causing builds to fail as their minimum coverage level specified by the Threshold MSBuild property is now no longer being met.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (2 by maintainers)

Most upvoted comments

I know that @danielpalme reportgenerator can picks more than one reports coverage file and generate one final html(or other types) report, I use it and AFAIK it’s used also by official azure dev ops, so it’s stable(Daniel can you confirm?). https://github.com/danielpalme/ReportGenerator#usage--command-line-parameters

Yes Azure DevOps also uses ReportGenerator internally to generate the coverage report.
Merging several files was always supported by ReportGenerator. You can give it a try.

And thanks for the advice we’ll keep more attention on versioning (related to missing breaking behavior)!

I’ve gotten all my dependabot PRs fixed-up manually now - thanks for the assistance!

Maybe you expect only one file for all projects, is it correct?

That’s correct, as that’s always been the behaviour previously.

Thanks for explaining what’s wrong and how to fix it - it’s unfortunate that this breaking change to the behaviour was made in a minor release and/or didn’t require a command-line flag to enable, though.