I had the same problem, and I tried most of the solution provided by other people, but it worked for me with the steps below. I have VS 2017.
Steps:
Install-Package EntityFramework -IncludePrerelease
then create a class like
public class MyDBContext : DbContext { public MyDBContext() { } }
and last run
Enable-Migrations -EnableAutomaticMigrations
What didn't work for me:
: Restart VS.
: Only the "Enable-Migrations" command, which is without -EnableAutomaticMigrations.
: Restore or update the Nuget Package Manager.
My initial mistake at the beginning was
/ * The term "allow migration" is not recognized as the name of the cmdlet, function, script file, or running program. Check the spelling of the name or, if the path was specified, check the path and try again. In line: 1 character: 1 + enable -igration + ~~~~~~~~~~~~~~~~ CategoryInfo: ObjectNotFound: (enable-migration: String) [], CommandNotFoundException * /
ironman Aug 12 '18 at 1:26 2018-08-12 01:26
source share