Skip to content

Commit f4f0bad

Browse files
Update documentation for powershell users (#1283)
Update documentation for powershell users
1 parent d427957 commit f4f0bad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Documentation/MSBuildIntegration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ In this mode, Coverlet doesn't require any additional setup other than including
44

55
If a property takes multiple comma-separated values please note that [you will have to add escaped quotes around the string](https://github.com/Microsoft/msbuild/issues/2999#issuecomment-366078677) like this: `/p:Exclude=\"[coverlet.*]*,[*]Coverlet.Core*\"`, `/p:Include=\"[coverlet.*]*,[*]Coverlet.Core*\"`, or `/p:CoverletOutputFormat=\"json,opencover\"`.
66

7+
To achieve same behavior above using **powershell** you need to use the verbatim argument marker `--%` like this:
8+
```powershell
9+
dotnet test /p:CollectCoverage=true --% /p:CoverletOutputFormat=\"opencover,lcov\"
10+
```
11+
712
## Code Coverage
813

914
Enabling code coverage is as simple as setting the `CollectCoverage` property to `true`

0 commit comments

Comments
 (0)