我试图在一个新项目中运行命令“ Enable-Migrations”,但收到消息:
PM> 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, verif
y that the path is correct and try again.
At line:1 char:18
+ Enable-Migrations <<<<
+ CategoryInfo : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
但是在所有其他项目中,命令运行正常。
为什么会这样呢?
顺便说一句,我正在使用VS2010 Professional SP1
编辑:我用命令重新安装:安装包EntityFramework -IncludePrerelease 和问题消失了。