简体   繁体   中英

Web Deploy: How to keep files on a specific destination folder

Scenario

  • Visual Studio 2012 web publishing: web Deploy method.
  • "Remove additional files at destination" option selected.
  • MVC3 website with a "upload" folder

Question

How to keep the existing files on destination for the upload folder without removing the "Remove addtional files..." option from the deployment settings?

Apparently you can do it with wpp.targets file. Then skip only the folder you want...

<ItemGroup>
  <MsDeploySkipRules Include="SkipErrorLogFolder1"> 
    <SkipAction>Delete</SkipAction> 
    <ObjectName>FolderPath</ObjectName> 
    <AbsolutePath>ErrorLog</AbsolutePath> 
  </MsDeploySkipRules> 
</ItemGroup>

Have a look here, see first there:

MSbuild command line parameter for skipping the directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM