理器控制台启用迁移仅在特定VS项目中的CommandNotFou

理器控制台启用迁移仅在特定VS项目中的CommandNotFou

本文介绍了软件包管理器控制台启用迁移仅在特定VS项目中的CommandNotFoundException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在新项目中运行命令启用迁移,并收到以下消息:

  PM>启用迁移
术语启用迁移不被识别为cmdlet,函数,脚本文件或可操作程序的名称。检查名称的拼写,或者如果包含路径,则验证路径是否正确,然后重试。
在行:1 char:18
+启用迁移<<<<
+ CategoryInfo:ObjectNotFound:(Enable-Migrations:String)[],CommandNotFoundException
+ FullyQualifiedErrorId:CommandNotFoundException

但是在所有其他项目中,命令运行正常。



为什么会这样?



我使用VS2010 Professional SP1



编辑:我使用逗号重新安装: Install-Package EntityFramework -

解决方案

我用commmand重新安装:Install-Package EntityFramework - 包括预发行,问题消失了。


I tried to run the command 'Enable-Migrations' in a new project and I got the message:

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

But in all other projects the command runs just fine.

Why is this happening?

BTW, I'm using VS2010 Professional SP1

EDIT: I reinstalled with the commmand: Install-Package EntityFramework -IncludePrereleaseand the problem went away.

解决方案

I reinstalled with the commmand: Install-Package EntityFramework -IncludePrerelease and the problem went away.

这篇关于软件包管理器控制台启用迁移仅在特定VS项目中的CommandNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 16:46