-
Notifications
You must be signed in to change notification settings - Fork 389
Multiple Excludes don't work in Powershell #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Try surrounding the entire property declaration in quotes "/p:Exclude=[*]*Examples?,[*]*Startup" |
I came here to submit the same issue. From the PowerShell window in VSCode it's not possible to separate filters with a comma, not even when surrounding the filters with double quotes:
Result:
|
I have exactly the same issue when running 'dotnet test' in a VSTS build pipeline under a linux machine. Result:
VSTS Task: Surrounding the exclude argument with double quotes as suggested by @tonerdo did not work for me Another weird thing, and I don't know whether this is the case with other people having this issue, is that the VSTS logs will show the command missing the first scaped double quote. The second double quote is escaped properly: |
Thanks for the suggestion. I tried it but still run into the same error |
Try this. Same as @tonerdo 's suggestion, but with single quotes and include escaped double quote |
Hey guys, I've fiddled with this a bit and from dotnet/msbuild#471 (comment) the definitive way to fix this issue is to use /p:Exclude="[*]*Examples?%2c[*]*Startup" This should do the trick for all Powershell related property parsing errors. Looking for a contributor to help add this to the README |
Alternatively you can try using a response file #30 (comment) |
This fixes it for us as well on a VSTS build. Thanx @tonerdo! |
@tonerdo I am willing to help with the documentation. Should I include the %2c solution as the standard way to specify multiple excludes, or is it something exclusive to Powershell (and VSTS build)? |
@glBeatriz thanks for volunteering. I think it's better to just add a note about Powershell under each section that involved separating property values with commas |
@tonerdo I tried it and its working for me too. Thanks for investigating. |
Created PR #191 regarding this issue |
I stumbled upon the same issue when executing in an docker environment (microsoft/dotnet:latest) with .NET core. |
What a martian way to run tests :/ |
I am trying to exclude multiple things but always getting an error when executing it in powershell:
Also tried this but no luck either:
Am I doing something wrong or is this a bug?
The response is in both cases. If used alone both of them work just fine.
The text was updated successfully, but these errors were encountered: