title: MsDeploy parameters.xml: howto refer a parameter?
body: <p>Currently I'm trying to create a Web Deploy Package. So I've added a parameters.xml to the root of my project and specified some custom parameters.
  I found that a lot of my parameters were partially the same. So I want to do some sort of a parameter referencing. Looking for this, I came accros <a href="http://www.iis.net/learn/develop/windows-web-application-gallery/reference-for-the-web-application-package" rel="nofollow noreferrer">Reference for the Web Application Package</a>. There it says the following:</p>
  
  <blockquote>
    <p>Hidden - A Hidden parameter is not shown to the user as part of the installation UI. A Hidden parameter must have a defaultValue set. These parameters are used either to set a hard-coded default value or to set a computed default value. Hard-coded defaults are sometimes used when establishing a parameter for future use. Computed values are used to construct a parameter’s value from other parameters. When constructing computed values, you can refer to other parameters by putting the other parameter name surrounded by {}s in the place you want the value. Please refer to the "Connection String" parameter in the example for a common usage of this tag.</p>
  </blockquote>
  
  <p>So, according to the documentation a parameter "vdeHostName" can be referenced from "vdeDashboardAddress", by setting the attribute defaultValue="https://{vdeHostname}/" and tags="Hidden" on "vdeDashboardAddress". </p>
  
  <p>This led me to the following code for the parameters.xml:</p>
  
  <pre><code>&lt;parameters&gt;
    &lt;parameter name="vdeHostname" description="Please provide the hostname" defaultValue="www.test.com"&gt;
      &lt;description culture="en"&gt;The hostname of the website.&lt;/description&gt;
      &lt;parameterEntry kind="XmlFile"
                      scope="obj\\Release\\Package\\PackageTmp\\Configuration\\hosts\.config$"
                      match="/hostConfigurationSection/hostConfigurations/add[@name='Default']/@host" /&gt;
    &lt;/parameter&gt;
    &lt;parameter name="vdeDashboardAddress" defaultValue="https://{vdeHostname}/" tags="Hidden"&gt;
      &lt;description culture="en"&gt;The https address of the Dashboard.&lt;/description&gt;
      &lt;parameterEntry kind="XmlFile"
                      scope="obj\\Release\\Package\\PackageTmp\\Configuration\\identity\.config$"
                      match="/system.identityModel/identityConfiguration[@name='Default']/audienceUris/add/@value" /&gt;
    &lt;/parameter&gt;
  &lt;parameters&gt;
  </code></pre>
  
  <p>However, this seems not to be the case. It does not reference/replace the parts of the attribute in the defaultValue.
  This is currently being outputted:</p>
  
  <pre><code>&lt;audienceUris&gt;
    &lt;add value="https://{vdeHostname}/" /&gt;
  &lt;/audienceUris&gt;
  </code></pre>
  
  <p>The only thread I found here mentioning anything about my problem is at <a href="https://stackoverflow.com/questions/18137773/how-to-get-deploy-cmd-to-fill-in-replacement-fields-from-parameters-xml">How to get Deploy.cmd to fill in replacement fields from Parameters.xml</a></p>
  
  <ol>
  <li>Does anyone know what I'm doing wrong here? </li>
  <li>Is the specification incorrect? Then, how does one do partial replaces in the parameters.xml? </li>
  </ol>
  
  <p>Thank you in advance!</p>
  
  <p>Best regards, rdvanbuuren</p>