当我尝试在我的数据库项目(EF 6.1.0 stable)中启用迁移时,它会抛出一个MissingMethodException:
Enable-Migrations -Verbose -Debug
Using StartUp project 'xxx.Data'.
Using NuGet project 'xxx.Data'.
System.MissingMethodException: Method not found: 'Void System.Data.Entity.Migrations.Design.ToolingFacade..ctor(System.String, System.String, System.String, System.String, System.String, System.String, System.Data.Entity.Infrastructure.DbConnectionInfo)'.
at System.Data.Entity.Migrations.MigrationsDomainCommand.GetFacade(String configurationTypeName, Boolean useContextWorkingDirectory)
at System.Data.Entity.Migrations.EnableMigrationsCommand.FindContextToEnable(String contextTypeName)
at System.Data.Entity.Migrations.EnableMigrationsCommand.<>c__DisplayClass2.<.ctor>b__0()
at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Method not found: 'Void System.Data.Entity.Migrations.Design.ToolingFacade..ctor(System.String, System.String, System.String, System.String, System.String, System.String, System.Data.Entity.Infrastructure.DbConnectionInfo)'.
任何人都有指针给我?
答案 0 :(得分:0)
通过降级到EF 5.0.0,启用迁移,将程序包更新到6.1.0来修复它。