You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add CoverletReport MSBuild item in the CoverageResultTask MSBuild task (#932)
So that the coverlet reports can be easily used by other MSBuild tasks. For example, using [ReportGenerator](https://github.com/danielpalme/ReportGenerator#usage--command-line-parameters) to generate an html coverage report.
```xml
<Target Name="GenerateHtmlCoverageReport" AfterTargets="GenerateCoverageResultAfterTest">
<ReportGenerator ReportFiles="@(CoverletReport)" TargetDirectory="../html-coverage-report" />
</Target>
```
Copy file name to clipboardExpand all lines: Documentation/MSBuildIntegration.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,14 @@ To specify a directory where all results will be written to (especially if using
44
44
dotnet test /p:CollectCoverage=true /p:CoverletOutput='./results/'
45
45
```
46
46
47
+
The coverlet MSBuild task sets the `CoverletReport` MSBuild item so that you can easily use the produced coverlet reports. For example, using [ReportGenerator](https://github.com/danielpalme/ReportGenerator#usage--command-line-parameters) to generate an html coverage report.
Coverlet can output basic code coverage statistics using [TeamCity service messages](https://confluence.jetbrains.com/display/TCD18/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ServiceMessages).
0 commit comments