3
votes

We have a continuous delivery process created using Jenkins, MSBuild, and Web Deploy. Things work beautifully when deploying to our development server, however, when I try to deploy a web deploy package using the *.deploy.cmd file on two newly configured servers the web.config changes defined in the parameters.xml file are not being applied. The rest of the deployment works great but I am seeing a message like this for every parameter that needs to change:

Verbose: Parameter entry 'config/1' could not be applied to '<path>\Package\PackageTmp\Web.config'. Deployment will continue with the original data. Details: 
Cannot set a value on node type 'Element'.

Since the transforms for the exact same package work on deployments to one server and not to the new servers, this seems like a server configuration issue but I've gone through and checked everything against Microsoft's Web Deploy install instructions and it all looks fine. I wasn't the person who originally set up Web Deploy on the working folder so I don't know what they might have done differently. I suspect this is related to permissions but the few places I can think to check were the same on both servers.

I found other questions with this error message where it was an issue with the XPath in their parameters.xml file. I don't think this is my problem because I can deploy successfully to one of my servers but here's an example from my paramters.xml and SetParams.xml files for good measure:

parameters.xml

<parameter name="config">
  <parameterEntry kind="XmlFile" scope="\\web.config$" match="//configuration/appSettings/add[@key='config']" />
</parameter>

*.SetParameters.xml

<parameters>
  <setParameter name="config" value="&lt;add key=&quot;config&quot; value=&quot;testing&quot; /&gt;" />
</parameters>

Does anyone know how to fix this or what kind of additional permissions I will need on my new servers?

1

1 Answers

0
votes

In retrospect this is embarrassingly obvious but it turns out that our issue was that the server support team had installed the wrong version of Web Deploy. We needed 3.5 or higher and they installed 2.10. Updating Web Deploy on the new servers resolved the issue.