title: How to configure Application Pool with MSDeploy
body: <p>I'm currently using MSBuild to create an MSDeploy package by passing in arguments:</p>
  
  <pre><code>/p:DeployOnBuild=true;DeployTarget=Package
  </code></pre>
  
  <p>I'm using a parameters.xml file (placed at the root of my website).  <a href="https://stackoverflow.com/questions/12241314/how-to-specify-default-application-pool-in-asp-net-mvc-project/12630846#comment18634094_12630846">Another SO question</a> I found tries to set up the application pool.</p>
  
  <p>My parameters.xml file:</p>
  
  <pre><code>&lt;parameters&gt;
      &lt;parameter name="Application Pool Name" description="Application Pool for this site" tags="" defaultValue="ASP.NET v4.0"&gt;
          &lt;parameterEntry kind="DeploymentObjectAttribute"
                          scope="application"
                          match="/application/@applicationPool" /&gt;
      &lt;/parameter&gt;
  ...
  &lt;/parameters&gt;
  </code></pre>
  
  <p>but it seems that the archive.xml file inside the msdeploy package generated by the msbuild doesn't have an  section with an applicationPool element</p>
  
  <p>How can I get the archive.xml to be generated with this section so that I can set the application pool?</p>
  
  <p>The app pool I want to set will exist already, so I'm not concerned with MSDeploy synching or creating app pools here.</p>
  
  <p>Edit:
  I have found this question <a href="https://stackoverflow.com/questions/7690954/how-do-i-control-the-apppool-used-for-deploy-through-vs-msdeploy-settings">How do I control the AppPool used for deploy through VS &amp; MSDeploy settings</a> which hints at using wpp.targets to generate a custom provider.  I'm exploring how to use this approach to modify the archive.xml file</p>