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
For asp.net core web apps use MsDeploySkipRules
in csproj.
<ItemGroup>
<MsDeploySkipRules Include="CustomSkipFile">
<ObjectName>filePath</ObjectName>
<AbsolutePath><dir_name>\\app_data</AbsolutePath>
</MsDeploySkipRules>
<MsDeploySkipRules Include="CustomSkipFile">
<ObjectName>dirPath</ObjectName>
<AbsolutePath><dir_name>\\app_data</AbsolutePath>
</MsDeploySkipRules>
</ItemGroup>
Replace <dir_name>
with your root folder
https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-2.1#exclude-files