I need to skip a file on the server when I deploy my app. My friend told me that I could use SkipExtraFilesOnServer
, but I don't understand how it works.
I have a .txt
file that I want to keep unchanged after deploy.
When you publish your Web App using Visual Studio, in the Publish wizard under Settings, expand the "File Publish Options" and uncheck "Remove additional files at destination". If they are static data files your app depends on, then they should really be in the App_Data folder and you can make sure the "Exclude files from the App_Data folder" is checked.. The first option leaves any unrecognized files on the destination.
In the PublishProfile under YourProject >> Properties >> PublishProfiles, you will find a copy of yourPublishProfile.pubxml. The corresponding elements respectively in this file are:
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
and <ExcludeApp_Data>True</ExcludeApp_Data>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With