I am using Visual Studio 2017 and Entity Framework 6 "Vidly" is the name of my project and solution. How to fix this migration issue? Please help Below are the screen shot of package manager console and solution explorer.
I have tried the following to fix the issue, But couldn't fix the issue
1) the Package Manager Console there's a "Default project" dropdown. You need to set this to the project that contains your EF context.
2) Enable-Migrations -ProjectName Vidly -StartUpProjectName Vidly -Verbose
Package Manager Console - Error
EDIT
Try to create a new project, just to check what we need. Ok so you go file> new> project, under visual c# menu new asp.net web application, choose any name for the project, this is just to check what it missing in our project. click ok, select MVC in the left side, and in the right side we can see a change authentication button, and under that button says, authentication: No authentication, click there and select individual user accounts. Click ok and that option, automatically install entity and identity. That is the problem.
I eventually found the answer in this question. Basically, in the Package Manager Console there's a "Default project" dropdown. You need to set this to the project that contains your EF context.
I found similar post: Enable Migrations with Context in Separate Assembly?
Example:
enable-migrations -ContextProjectName MyProject.DBContexts -contexttypename MyProject.DBContexts.MyContextName -Verbose