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 迁移?
基础教程推荐
- Moq It.Is<>不匹配 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
