我安装了 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
最佳答案
发生于 EF5 RTM、VS2012 RTM .
我今天遇到了这个问题。我在 PM 控制台中执行了“Update-Package EntityFramework”。 NuGet 未报告任何更改,问题仍然存在。然后我重新启动 VS2012 并重新尝试更新数据库,它按预期工作。不清楚是什么导致了这个问题,也不清楚更新包是否有助于纠正它。
首先尝试重新启动 Visual Studio,然后尝试 Update-Package EntityFramework,然后重新启动。
关于entity-framework - 更新数据库错误 - NuGet 包 (EntityFramework.SqlMigrations),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7567657/