Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 删除迁移在VS 2015中不起作用_C#_Entity Framework - Fatal编程技术网

C# 删除迁移在VS 2015中不起作用

C# 删除迁移在VS 2015中不起作用,c#,entity-framework,C#,Entity Framework,我创建了一个尚未应用的迁移(例如,我尚未为创建的迁移运行“更新数据库”)。我想使用“Remove migration”命令删除这个新未应用的迁移,但每次我在控制台中键入它时,都会出现以下错误: PM> Remove-Migration Remove-Migration : The term 'Remove-Migration' is not recognized as the name of a cmdlet, function, script file, or operable pro

我创建了一个尚未应用的迁移(例如,我尚未为创建的迁移运行“更新数据库”)。我想使用“Remove migration”命令删除这个新未应用的迁移,但每次我在控制台中键入它时,都会出现以下错误:

PM> Remove-Migration
Remove-Migration : The term 'Remove-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
+ Remove-Migration
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Remove-Migration:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

你能帮我做这个吗。谢谢。

重新启动对Visual Studio 2015有效。如果无效:
删除迁移
命令适用于EF Core。对于EF6,您应该手动从项目中删除生成的迁移文件节点..Ahh。我懂了。谢谢你!