术语“添加迁移"无法识别 - VS2017 和 EntityFrameworkCore [英] The term 'Add-migration' is not recognized - VS2017 and EntityFrameworkCore

查看:17
本文介绍了术语“添加迁移"无法识别 - VS2017 和 EntityFrameworkCore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发布这个问题只是为了防止我找到的解决方案可以帮助其他人.在 Visual Studio 2017 rc4 中工作时,每次我尝试在包管理器控制台中运行 Add-Migration 命令时,我都会收到以下错误:

I am posting this question just in case the solution I found would help someone else out. While working in Visual Studio 2017 rc4 each time I tried to run the Add-Migration command in the Package Manager console I get the following error:

无法识别术语添加迁移"...

The term 'Add-migration' is not recognized...

推荐答案

在尝试了大量其他已发布的解决方案后,对我有用的解决方案是:

The solution that worked for me after trying a whole raft of other solutions posted, was to:

  • 右键单击我的项目
  • 选择 Manage Nuget Packages
  • 选择浏览标签
  • 包括预发布复选框
  • 安装Microsoft.EntityFrameworkCore.Tools

注意,visual studio 2017 中的 aspnetcore 项目似乎没有 project.json 文件.

N.b that aspnetcore project in visual studio 2017 do not seem to have the project.json file.

这篇关于术语“添加迁移"无法识别 - VS2017 和 EntityFrameworkCore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆