相关疑难解决方法(0)

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

我正在使用这个MSDN教程在VS2015 PM> Add-Migration MyFirstMigration -context BloggingContext中运行昨天成功运行的命令,但今天它给出了以下错误,这也是其他用户在这里指出的.我甚至从解决方案资源管理器中删除了Migrations文件夹,并从SQL Express 2014 on Win 8.1相同的错误中删除了相应的数据库 即使我跑,Add-Migration MyFirstMigration我得到同样的错误:

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.
At line:1 char:1
+ Add-Migration MyFirstMigration -context BloggingContext
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Add-Migration:String) [], CommandNotFoundException …
Run Code Online (Sandbox Code Playgroud)

entity-framework-core visual-studio-2015 asp.net-core

45
推荐指数
11
解决办法
6万
查看次数