Make MSDeploy (Visual Studio) not delete App_Data folder but delete everything else

前端 未结 7 754
一整个雨季
一整个雨季 2020-11-30 19:42

I\'m using Visual Studio\'s Publish button to deploy my website, and want a different App_Data folder on the server. There\'s a checkbox for Leave extra f

7条回答
  •  时光说笑
    2020-11-30 20:37

    This isn't ideal since you may be copying a lot of files doing this (I'm not), but here's my solution for backing up a folder. Adapted to move the folder to the location from which it will be published, during the publish process. Put this in your pubxml file:

    
    ...
    
       
         
       
       
    
    
    

    And if you just want to do any number of specific known files, do one Copy block per file:

    
        
    
    

提交回复
热议问题