我安装了EntityFramework.SqlMigrations NuGet包,得到了这个错误。它在过去对我有效,但不知何故,现在它不起作用了。
PM> update-database
The term 'update-database' 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, verify that the
path is correct and try again.
At line:1 char:16
+ update-database <<<<
+ CategoryInfo : ObjectNotFound: (update-database:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException发布于 2013-01-16 06:14:15
与EF5 RTM、VS2012 RTM一起发生。
我今天遇到了这个问题。我在PM控制台执行了"Update-Package EntityFramework“。NuGet未报告任何更改,问题仍然存在。然后我重新启动了VS2012,并重新尝试更新数据库,它如预期的那样工作。目前还不清楚是什么导致了这个问题,也不清楚更新包是否有助于纠正这个问题。
首先尝试重新启动Visual Studio,然后尝试更新-Package EntityFramework,然后重新启动。
发布于 2014-02-04 20:52:08
我刚刚使用了这个命令:
Update-Package EntityFramework -Reinstall发布于 2011-10-24 17:27:56
在我的例子中,我首先帮助安装了EntityFramework包:
Install-Package EntityFramework然后再次安装EntityFramework.Migrations:
Install-Package EntityFramework.Migrationshttps://stackoverflow.com/questions/7567657
复制相似问题