13

I'm trying to run for the first time in my new mvc 4 application PM> Enable-Migrations –EnableAutomaticMigrations

I'm geting:

Enable-Migrations : The term 'Enable-Migrations' 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.
At line:1 char:1
+ Enable-Migrations –EnableAutomaticMigrations

What am I missing? I have installed e.f 5.

Simon
  • 1,966
  • 5
  • 21
  • 35

4 Answers4

14

Try typing in Package Manager Console:

Install-Package EntityFramework -IncludePrerelease

and then Restart Visual Studio.

Kohlbrr
  • 3,861
  • 1
  • 21
  • 24
AmanHanzra
  • 141
  • 1
  • 4
1

First "Install-Package EntityFramework -IncludePrerelease" and then Restarting Visual Studio as a Administrator worked for me together.

[Refer this] : Package Manager Console Enable-Migrations CommandNotFoundException only in a specific VS project

Community
  • 1
  • 1
0

I had the framework installed (5.x) and retried running the same commands after running in admin mode. This has resolved the issue -- quite strange though.

sarat
  • 10,512
  • 7
  • 43
  • 74
0

You have to make sure that you don't have any square brackets "[" in your path directory of the project. Apparently VS 2013 is not happy with project folders named with square brackets.

Erindy
  • 155
  • 11