Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where "include files from the App_data folder" option?

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?

like image 863
Alexan Avatar asked Nov 01 '25 13:11

Alexan


2 Answers

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.

like image 71
Nate Dudek Avatar answered Nov 03 '25 12:11

Nate Dudek


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>  
like image 27
Lord Darth Vader Avatar answered Nov 03 '25 13:11

Lord Darth Vader



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!