title: How do I get msdeploy to create App_Data if it doesn't exist, but not delete any contents of the remote directory?
body: <p>I have an application setup with the following Package/Publish Web settings:</p>
  
  <ul>
  <li>Only files needed to run this application</li>
  <li>(unchecked) Exclude generated debug symbols</li>
  <li>(checked) Exclude files from the App_Data folder</li>
  <li>(checked) Include all databases configured in Package/Publish SQL tab - note I do <em>not</em> have any databases configured</li>
  <li>(unchecked) include IIS settings as configured in IIS Express</li>
  </ul>
  
  <p>In the project, I have an App_Data folder setup, primarily to handle application logs.</p>
  
  <p>The behavior I'd like to see (and expect) is the following:</p>
  
  <ol>
  <li>On initial deploy to a brand new server, the application is copied and an App_Data folder is created with write permissions assigned for the application.</li>
  <li>On subsequent deployments, the App_Data folder is ignored because it already exists and the "Exclude files from the App_Data folder" is checked.</li>
  </ol>
  
  <p>However, msdeploy does not appear to do step #1 (step 2 is fine if I create the folder manually).  I've been unable to find any documentation on the web besides this <a href="https://stackoverflow.com/questions/7059880/mvc-code-first-app-data-folder-not-being-created">unanswered so question</a> that seems to confirm the behavior I see.</p>
  
  <p>How do I get msdeploy to create App_Data and assign permissions on initial deployment in this scenario?</p>