Skip to content

Commit 4fa41cf

Browse files
authored
Merge pull request #191 from glBeatriz/edit-documentation-multiple-includes-excludes-powershell-vsts
Edit documentation multiple includes excludes powershell vsts
2 parents 47206b0 + 1472c69 commit 4fa41cf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ In this mode, Coverlet doesn't require any additional setup other than including
200200
201201
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\"`.
202202
203+
##### Note for Powershell / VSTS users
204+
To exclude or include multiple assemblies when using Powershell scripts or creating a .yaml file for a VSTS build ```%2c``` should be used as a separator. Msbuild will translate this symbol to ```,```.
205+
206+
```/p:Exclude="[*]*Examples?%2c[*]*Startup"```
207+
208+
VSTS builds do not require double quotes to be unescaped:
209+
```
210+
dotnet test --configuration $(buildConfiguration) --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=$(Build.SourcesDirectory)/TestResults/Coverage/ /p:Exclude="[MyAppName.DebugHost]*%2c[MyAppNamet.WebHost]*%2c[MyAppName.App]*"
211+
```
212+
203213
#### Code Coverage
204214
205215
Enabling code coverage is as simple as setting the `CollectCoverage` property to `true`

0 commit comments

Comments
 (0)