最佳答案
我尝试在一个新项目中运行命令“ Enable-Migations”,我得到了这样的信息:
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专业 SP1
编辑: 我使用以下命令重新安装: < strong > Install-Package EntityFramework-IncludePrerelease 问题就解决了。