未将术语“添加迁移”识别为cmdlet的名称 [英] The term 'add-migration' is not recognized as the name of a cmdlet

查看:109
本文介绍了未将术语“添加迁移”识别为cmdlet的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以从一天到第二天,我的迁移工作都停止了。我确实进行了迁移,并说它未被识别。我正在使用PM,因为这是asp.net mvc,并且在前一天工作。

So randomly from one day to the next my migrations stopped working. I do add-migration and it says its not being recognized. I'm using PM since this is a asp.net mvc and was working the day before.


add-migration:术语添加 -migration'无法识别为cmdlet,函数,脚本文件或可运行程序的名称。检查名称的
拼写,或者是否包含路径,请验证路径是否正确,然后重试。

add-migration : The term 'add-migration' 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.

推荐答案

这并不是OP所面临的问题,但至少对于dotnet core,这也可能是由于未安装 Microsoft.EntityFrameworkCore.Tools nuget软件包引起的,该软件包用于Visual Studio和Windows Server 2003中的软件包管理器命令。命令行。

This isn't exactly the issue the OP is having, but for dotnet core at least, this can also be caused by not having the Microsoft.EntityFrameworkCore.Tools nuget package installed, which is used for the package manager commands in Visual Studio and command line.

这篇关于未将术语“添加迁移”识别为cmdlet的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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