Msdeploy and setparameters.xml

asp.netmsbuildmsdeployparameters

I'm having issue with the SetParameters.xml file used by msdeploy.

In my website I've created a parameters.xml file which contains the following:

<parameters>
    <parameter name="enableRule" defaultValue="DoNotDeleteRule"></parameter>
</parameters>

During the build of the deployment package, this parameter is added to the setParameters.xml file, which then looks like:

<parameters>
  <setParameter name="IIS Web Application Name" value="mywebsite/myservice/>
  <setParameter name="enableRule" value="DoNotDeleteRule" />
</parameters>

Yet, when I run msdeploy (using the cmd of the package), the parameter is ignored. I've tried calling the cmd by adding the -setParamFile attribute, but that didn't make any difference…

Can someone help me with this ?

Best Answer

You are confusing the concept of MSDeploy "parameters" with msdeploy.exe arguments. The latter contains features that cannot be specified using the former. For example "verb", "source", "dest", "enableLink", etc

Your only choice is to pass "-enableRule:DoNotDeleteRule" as an actual command line arguments to msdeploy.exe (I believe tacking it onto the end of your call to the cmd file will also suffice)

Related Topic