问题描述
我使用 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 迁移?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!