Question

According this answer, 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

Where it is?

Was it helpful?

Solution

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.

OTHER TIPS

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>  
  1. Manually Create the App_Data folder under the published application's root folder
  2. Right click at the App_Data folder and select Publish App_Data folder.
  3. Add an item into the App_Data folder and set the item to be include in the publish.

https://forums.asp.net/t/2126248.aspx?App_Data+folder+missing+in+release

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top