dotnet test eats quotes in TestRunParameters
See original GitHub issueNote
Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo
For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
If you have an issue or request for the Azure Pipelines service, use developer community instead:
https://developercommunity.visualstudio.com/spaces/21/index.html )
Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: DotNetCoreCLI@2
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment
-
Server - Azure Pipelines or TFS on-premises? Azure pipelines
-
If using TFS on-premises, provide the version:
-
If using Azure Pipelines, provide the account name, team project name, build definition name/build number:
-
-
Agent - Hosted or Private:
-
If using Hosted agent, provide agent queue name:
-
If using private agent, provide the OS of the machine running the agent and the agent version:
-
Issue Description
- task: DotNetCoreCLI@2
inputs:
command: 'test'
arguments: '-- TestRunParameters.Parameter(name=%22EdiStagingFunctionsKey%22,value=%22key2%22) TestRunParameters.Parameter(name=%22EdiAADKey%22,value=%22key1%22)'
This is the only way I am able to pass TestRunParameters to the run. This was reported here: https://github.com/microsoft/vstest/issues/2387 and the escaping was fixed in vstest and dotnet sdk, but some additional rules are applied on the AzDO task side. Because for example \ is replaced by / and quotes are eaten by the task. So it is not true that what works on the command line works in the task (mentioned here https://github.com/microsoft/azure-pipelines-tasks/issues/10712#issuecomment-552195220 ) and none of the approaches described there worked for me, except for providing the quotes as URL escapes %22
.
Ideally the user would be able to copy paste from the command line, where \"
is the way to escape the quotes properly.
Task logs
https://dev.azure.com/jajares/params/_build?definitionId=6&_a=summary
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
[Insert error from the logs here for a quick overview]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:21 (4 by maintainers)
yes @nohwnd once this issue https://github.com/microsoft/azure-pipelines-task-lib/issues/648 is fixed the escape sequence will work
WORKAROUND Will work with “.NET Core”-Build-Task with Command “test” on on-premise server 2019.0.1. Later not tested. But maybe…
-- "TestRunParameters.Parameter(name=\\\"<name1>\\\", value=\\\"<value1>\\\")" "TestRunParameters.Parameter(name=\\\"<name2>\\\", value=\\\"<value2>\\\")"