c# - 如何在 visual studio 2015 中管理 EF 6 迁移?

标签 c# entity-framework entity-framework-6 entity-framework-migrations visual-studio-2015

我用 EntityFramework -Version 6.1.2 使用 Visual Studio 2013 最新更新启动了一个新的 MVC 项目。我进行了几次迁移并更新了数据库。在此之后,我在另一台计算机上检查了该项目并使用 Visual Studio 2015 CTP 6 打开。

如果我进入包管理器控制台并尝试运行任何迁移命令,它们将无法识别:

add-migrations : The term 'add-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, verify that the path is correct and try again.

如何在 Visual Studio 2015 中使用 Entity Framework 6 管理我的迁移?

最佳答案

您是否尝试过卸载并重新安装 Entity Framework NuGet 包?我遇到了与描述相同的问题,它已解决。

关于c# - 如何在 visual studio 2015 中管理 EF 6 迁移?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28856271/

相关文章:

c# - 如果我每次都没有取消配对我的蓝牙 LE 设备,为什么我不能发送消息? (UWP)

c# - 从对象转换为字符串时如何处理空异常?

c# - Interlocked.Increment 一个整数数组

entity-framework - 如何按照约定首先删除代码中外键字段的下划线

c# - 包含对面的实体 EF6

c# - 我已经编写了一个线程池,如何通知使用它的方法任务已经完成?

.net - 如何处理 Entity Framework 中缺少主键的问题?

c# - LINQ to SQL,不为空,使用默认值

c# - 我应该在哪里连接到上下文以获得更好的性能?

c# - 运行 Entity Framework 迁移时缺少根元素