I have used Entity Framework migrations numerous times before, but I am unable to enable migrations in a new demo project I just created. I have tried the different options recommended on SO Posts but nothing seems to work. Here is how the project was created (essentially following Julia Lerman's book example):
- Created a blank Visual Studio solution
- Added class library project for Models, DataAccess (.NET standard)
- Added DbContext in DataAccess project
- Added a console application project to the solution
- Used NuGet to install EntityFramework 6 to the DataAccess and ConsoleApplication projects
The project runs fine and creates the database in the SQLEXPRESS server on my desktop. There was no connection string anywhere in the application. There is also no app.config file in the DataAccess project. The only app.config is in the console application project.
I even added a connection string to the console application's app.config and tried the different options with enable-migrations. But nothing seems to work.
Using Visual Studio 2017 15.5.4 Community Edition