I am attempting to commit an update to my ASP.Net MVC project using GitHub integration in Microsoft Visual Studio 2017.
I am working on Code-First Migrations. After my previous successful commit, I performed the following commands on the Package Manager Console in Visual Studio:
PM> Enable-Migrations -ContextType ApplicationDbContext
PM> Add-Migration AccountNumberChanges
PM> Update-Database -Verbose
Once this was done, I tried perform a commit, but I was getting the following error:
Git failed with a fatal error.
error: open("MyProject/App_Data/aspnet-MyProject-
20171110110346.mdf"): Permission denied
fatal: Unable to process path MyProject/App_Data/aspnet-
MyProject-20171110110346.mdf
The above commands have added the .mdf file to the project's App_Data folder.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…