加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

实体框架 – 更新数据库错误 – NuGet软件包(EntityFramework.Sq

发布时间:2020-12-12 06:57:02 所属栏目:MsSql教程 来源:网络整理
导读:我安装了EntityFramework.SqlMigrations NuGet软件包 我收到这个错误。 它在过去和以某种方式为我工作,现在它不起作用。 PM update-databaseThe term 'update-database' is not recognized as the name of a cmdlet,function,script file,or operable progra
我安装了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,并重新尝试Update-Database,并且按预期工作。目前还不清楚是什么导致了这个问题,还不清楚Update-Package是否有助于纠正它。

首先尝试重新启动Visual Studio,然后尝试Update-Package EntityFramework,然后重新启动。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读