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 迁移?
基础教程推荐
- C# 9 新特性——record的相关总结 2023-04-03
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 将数据集转换为列表 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 如果条件可以为空 2022-01-01
