title: MSDeploy setParameter not working
body: <p>We are trying to integrate a 'build once, deploy anywhere' model in our build-deploy system.</p>
  
  <p>MSDeploy works wonders for this, cutting down build time dramatically with CRC checksum comparisons and (<strong>for the most part</strong>) it works just as well when using parameterisation to change applications web.configs depending on the environment we deploy to.</p>
  
  <p>I have the majority of these parameters nailed down, but a few elements and attributes <strong>never</strong> seem to change, no matter how many different ways I call them in the parameters.xml file. I have outlined three examples of this, here is the web.config file I am trying to change:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
      &lt;connectionStrings&gt;
          &lt;add name="DbConnectionString" connectionString="Data Source=null;Initial Catalog=null;Trusted_Connection=no;User ID=user1;Password=pass*9;" providerName="System.Data.SqlClient" /&gt;
      &lt;/connectionStrings&gt;
  
      &lt;system.web&gt;
          &lt;customErrors mode="On" defaultRedirect="/Library/Error/PageNotFound.aspx"&gt;
          &lt;/customErrors&gt;
      &lt;/system.web&gt;
  
      &lt;applicationSettings&gt;
          &lt;settings&gt;
              &lt;setting name="service_Address" serializeAs="String"&gt;
                      &lt;value&gt;&lt;/value&gt;
              &lt;/setting&gt;
          &lt;settings&gt;
      &lt;/applicationSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Here is the parameters.xml file:</p>
  
  <pre><code>&lt;parameter name="DbConnectionString" defaultValue=""&gt;
      &lt;parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/connectionStrings/add[@name='DbConnectionString']/@connectionString" /&gt;
  &lt;/parameter&gt;
  
  &lt;parameter name="customErrorsMode" defaultValue=""&gt;
      &lt;parameterEntry kind="XmlFile" scope="\\web.config$" match="configuration/system.web/customErrors/@mode" /&gt;
  &lt;/parameter&gt;
  
  &lt;parameter name="service_Address" defaultValue=""&gt;
      &lt;parameterEntry kind="XmlFile" scope="\\web.config$" match="/configuration/applicationSettings/aim.Web.Properties.Settings/setting[@name='service_Address']/value" /&gt;
  &lt;/parameter&gt;
  </code></pre>
  
  <p>And here is the corresponding setParameters.xml file:</p>
  
  <pre><code>&lt;setParameter name="DbConnectionString" value="Data Source=dbserver;Initial Catalog=DB1;Trusted_Connection=no;User ID=user1;Password=pass*9;"/&gt; 
  
  &lt;setParameter name="customErrorsMode" value="Off"/&gt;
  
  &lt;setParameter name="service_Address" value="https://myservice.asmx"/&gt;
  </code></pre>
  
  <p>I have tested each XPath expression and the results are the exact same as any of the other working parameters, but the above never seem to change.</p>
  
  <p>Does anyone see anything obvious I'm missing here?</p>