相关疑难解决方法(0)

程序包管理器控制台仅在特定的VS项目中启用 - 迁移CommandNotFoundException

我试图在一个新项目中运行命令'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
Run Code Online (Sandbox Code Playgroud)

但是在所有其他项目中,命令运行得很好.

为什么会这样?

顺便说一下,我正在使用VS2010 Professional SP1

编辑:我重新安装了命令:Install-Package EntityFramework -IncludePrerelease ,问题消失了.

migration entity-framework

108
推荐指数
8
解决办法
11万
查看次数

标签 统计

entity-framework ×1

migration ×1