更新数据库错误-NuGet软件包(EntityFramework.SqlMigrations) [英] update-database error - NuGet Package (EntityFramework.SqlMigrations)

查看:48
本文介绍了更新数据库错误-NuGet软件包(EntityFramework.SqlMigrations)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了EntityFramework.SqlMigrations NuGet包
,并且出现此错误。
过去对我有用,现在不起作用了。

i installed EntityFramework.SqlMigrations NuGet Package and i get this error . it worked for me in the past and somehow, now it does not work.

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控制台中执行了更新包EntityFramework。 NuGet没有报告任何更改,问题仍然存在。然后,我重新启动了VS2012,并重新尝试了Update-Database,它按预期工作。目前尚不清楚是什么导致了此问题,也不清楚Update-Package是否有助于纠正此问题。

I experienced this problem today. I executed "Update-Package EntityFramework" in the PM Console. No changes were reported by NuGet and the problem persisted. I then restarted VS2012 and re-attempted Update-Database and it worked as expected. It's not clear what caused this problem, it's also not clear whether the Update-Package contributed to correcting it or not.

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

First try restarting Visual Studio, then try Update-Package EntityFramework followed by a restart.

这篇关于更新数据库错误-NuGet软件包(EntityFramework.SqlMigrations)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆