How can I manage EF 6 migrations in visual studio 2015?(如何在 Visual Studio 2015 中管理 EF 6 迁移?)
问题描述
我使用 Visual Studio 2013 最新更新使用 EntityFramework -Version 6.1.2
开始了一个新的 MVC 项目.我进行了几次迁移并更新了数据库.在此之后,我在另一台计算机上检查了项目并使用 Visual Studio 2015 CTP 6 打开.
I started a new MVC project with EntityFramework -Version 6.1.2
using Visual Studio 2013 latest update. I made a couple of migrations and updated the database. After this I checked out the project on another computer and opened with Visual Studio 2015 CTP 6.
如果我进入包管理器控制台并尝试运行任何迁移命令,它们将无法识别:
If I go in the package manager console and try to run any migration commands, they're not recognized:
add-migrations :术语add-migrations"未被识别为 cmdlet、函数、脚本文件或可运行程序的名称.检查名称的拼写,或者如果包含路径,请验证路径是否正确并重试.
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 管理我的迁移?
How can I manage my migrations using Entity Framework 6 in Visual Studio 2015?
推荐答案
您是否尝试过卸载并重新安装 EntityFramwork NuGet 包?我遇到了与描述相同的问题,它解决了.
Have you tried uninstalling and reinstalling EntityFramwork NuGet package? I had the same issue as described and it solved it.
这篇关于如何在 Visual Studio 2015 中管理 EF 6 迁移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Visual Studio 2015 中管理 EF 6 迁移?


基础教程推荐
- JSON.NET 中基于属性的类型解析 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01