我试图在一个新项目中运行命令“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
编辑:我重新安装了命令:Install-Package EntityFramework -IncludePrerelease ,问题就消失了。