Azure DevOps Pipelines breaks my "additional arguments" when using Deploy to Azure

Recently, something in the Azure DevOps Pipelines "Deploy to Azure" flow has been messing up parameters in the "additional arguments" field under "Additional Deployment Options".

, by Joe Glombek

We historically had parameters to skip the umbraco and umbraco_client folders:

-skip:objectname=filePath,absolutepath="\\(umbraco|umbraco_client)\\" -skip:objectname=dirPath,absolutepath="\\(umbraco|umbraco_client)\\"

However, somewhere along the lines, this was being corrupted to produce the following command:

msdeploy.exe [...] -skip:objectname=filePath,absolutepath="\\\(umbraco|umbraco_client)\\" -skip:objectname=dirPath\,absolutepath=\\(umbraco|umbraco_client)\\

And thus, the error:

##[error]Error: 'umbraco_client)\\' is not recognized as an internal or external command, operable program or batch file.

It looks like Pipelines is doing some of the work to escape backslashes (\) and double quotes (") itself but getting confused, removing some, and adding them back in all the wrong places!

We tried various variations of removing and escaping with different characters, trying to reverse-engineer what Pipelines was doing to our simple text string until Fernando suggested removing the (required) quotes altogether, which worked!

Additional arguments:

-skip:objectname=filePath,absolutepath=\\(umbraco|umbraco_client)\\ -skip:objectname=dirPath,absolutepath=\\(umbraco|umbraco_client)\\

Generated command:

msdeploy.exe [...] -skip:objectname=filePath,absolutepath="\\(umbraco|umbraco_client)\\" -skip:objectname=dirPath,absolutepath="\\(umbraco|umbraco_client)\\"

If anybody has any further insight into this, please do to get in touch via social media - I'd love to expand on the details here.