Coverage is overwritten if the project has multiple target frameworks
See original GitHub issueIf a system under test has multiple target frameworks, then
dotnet test /p:CollectCoverage=true
runs multiple coverage runs, overwriting the coverage output each time.
This is the equivalent of AltCover issue #31.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Multiple target framework project: different versions of the ...
A simple way to do it is to add the <PackageReference ...> nodes conditionally: <ItemGroup> <!-- .
Read more >Targeting multiple versions of the .NET Framework from ...
The new exception management library I've been working on was originally targeted for .NET 4.6, changing to .NET 4.5.2 when I found that ......
Read more >Support multiple .NET Framework versions in your project file
Description of the various methods to target multiple .NET Framework versions from within a single NuGet package in your project file.
Read more >ReSharper, .NET Core and unit testing
Given a project with multiple target frameworks, ReSharper will maintain a separate tree of test classes and methods for each target framework, ...
Read more >Compliance frameworks | GitLab
You can create a compliance framework that is a label to identify that your project has certain compliance requirements or needs additional oversight....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Our workaround is to use merging and two output formats:
/p:CollectCoverage=true /p:CoverletOutput=./TestResults/ /p:CoverletOutputFormat=\"json,cobertura\" /p:MergeWith=./TestResults/coverage.json
Workaround is just to run
dotnet test
with -f <framework>
, grab the coverage.xml, then run it again with-f <other_framework>