I am following the MVC Music Store tutorial and it says I can create the App_Data folder by clicking on Project -> Add ASP.Net folder -> App_Data.
However when I do that I see that all the standard ASP.Net folders are disabled and cannot be selected. Why is that and how do I fix it?
I came across this problem too. You have to make sure the project is selected in the Solution Explorer and not just some file or folder within the project. If the project is selected, your Add ASP.NET folder options will become enabled. Alternatively, right click on the project in the tree and go to Add -> Add ASP.NET Folder. That will make sure the project is indeed selected.
Check to see if the folder already exists physically (using Windows Explorer, not Visual Studio Solution Explorer).
Visual Studio
won't allow you to add App_Data
if there is already a folder there of the same name even if the project doesn't "include
" it (meaning that it won't appear in the project despite being in the folders).
You can "Add existing item
" to include it or try deleting the physical folder then adding the ASP.NET
folder.
I don't know why the physical folder existed but wasn't included in the project.
To be certain, I added the folder as an existing item to the project, deleted from the project (which dumped that folder into the recycle bin), then added the ASP.NET
App_Data
folder (which created a new one).
Just to be sure.
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