So randomly from one day to the next my migrations stopped working. I do add-migration and it says its not being recognized. I'm using PM since this is a asp.net mvc and was working the day before.
add-migration : The term 'add-migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Even simpler for me, just re-starting VS2017 fixed this. Not had it until I got VS2017 professional, so this may be an issue for others in the latest version.
This isn't exactly the issue the OP is having, but for dotnet core at least, this can also be caused by not having the
Microsoft.EntityFrameworkCore.Tools
nuget package installed, which is used for the package manager commands in Visual Studio and command line.I had this same problem, and simply closing the Package Manager Console, then restarting Visual Studio fixed it.
I suspect that your default project needs to be set, as Kirk Larkin mentioned in the comments. Click the drop down list on default project and set it to which ever project you have entity framework installed on.
Also this link might help if your default project drop down list won't populate NuGet Package Manager Console Default Project dropdown is empty
Hope this helps! If not let me know and I'll remove the answer(I had to use an answer because I can't comment under 50 rep) Cheers!
I reinstalled Nuget package manager and it worked for me. Fist I uninstalled the previous version, 2.0.x, then installed version 2.8.x