I used msbuild to build a deployment package for my website. I am trying to use the generated deploy.cmd file located in the package to deploy to a remote server. I am using web deploy's parameters and I would like to set these at the command line using the -setParam flag.
The usage instructions for WebDeploy indicate that I need to enclose the -setParam configuration option in quotation marks because it contains an '=' character. However, the deploy.cmd file passes the entire option, including quotation marks, to the msdeploy executable. The msdeploy executable fails to run because the option does not start with the "-" character.
Error: Unrecognized argument '"-setParam:TestParam=ABC123"'. All arguments must begin with "-".
What do I need to do in order to get the setParam call working with the cmd file generated by msBuild?
You don't need to wrap the entire parameter in quotes because of the equals sign. Just the parameter key and value because it may contain spaces.
should work for your example. Or in real world: