1

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 ?

2 Answers 2

5

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)

Sign up to request clarification or add additional context in comments.

1 Comment

I don't know why i was so sure that I could pass the actual arguments via the parameters file. Thanks for helping.
2

You can use the option -setParamFile I was using it like: -setParamFile=file.xml and getting errors, but had success with -setParamFile:file.xml

Note the : instead of = like the doco says

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.