According this [answer](https://stackoverflow.com/a/1570909/240564), it should be option "include files from the App\_data folder" when you publish ASP.NET application. But I don't see it:
![enter image description here](https://i.stack.imgur.com/qMr0h.png)

Where it is?
['https://Stackoverflow.com/questions/16086943', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/240564/']
I don't believe that option is in the newest of Visual Studio.

Instead, you should be able to change the Build Action to "Content" by right-clicking on the files in Solution Explorer and clicking "Properties."

This should then include them in the publishing process.
I used a After Build Target. To just create a empty folder on deploy.

Add this to the end of The project file .csproj

```
<Target Name="CreateDirectories" AfterTargets="GatherAllFilesToPublish">   
    <MakeDir Directories="$(OutputPath)App_Data\"/>  
</Target>  

```