Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 952
fcaldera Avatar asked Oct 31 '12 14:10

fcaldera


1 Answers

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

like image 140
Ademar Avatar answered Nov 08 '22 18:11

Ademar