Skip to content

Commit bce3689

Browse files
Beatriz Del_SazBeatriz Del_Saz
authored andcommitted
edited documentation with note to powershell and VSTS users regarding multiple includes and excludes
1 parent fece36a commit bce3689

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
@@ -194,6 +194,16 @@ Examples
194194
195195
Both `--exclude` and `--include` options can be used together but `--exclude` takes precedence. You can specify the `--exclude` and `--include` options multiple times to allow for multiple filter expressions.
196196
197+
Note for Powershell / VSTS users
198+
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 ```,```.
199+
200+
```/p:Exclude="[*]*Examples?%2c[*]*Startup"```
201+
202+
VSTS builds do not require double quotes to be unescaped:
203+
```
204+
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]*"
205+
```
206+
197207
### MSBuild
198208
199209
In this mode, Coverlet doesn't require any additional setup other than including the NuGet package in the unit test project. It integrates with the `dotnet test` infrastructure built into the .NET Core CLI and when enabled, will automatically generate coverage results after tests are run.

0 commit comments

Comments
 (0)