use*_*040 6 entity-framework ef-migrations
我有一个MVC 4项目,最近升级到EF 6.0.我只有一个包含模型和dbcontext的项目.我无法启用迁移,错误如下:
System.NullReferenceException: Object reference not set to an instance of an object. at System.Data.Entity.Migrations.Extensions.ProjectExtensions.GetPropertyValue[T](Project project, String propertyName) 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) Object reference not set to an instance of an object.
谷歌搜索过去2天的答案,似乎没有任何作用.请帮我.
本周,当我的高级开发人员将解决方案更新为EF6时,我遇到了同样的问题.
从源代码管理中获取"获取最新"后,迁移不再起作用.Visual Studio重新启动解决了该问题.可能EF5库仍在内存中.
| 归档时间: |
|
| 查看次数: |
6524 次 |
| 最近记录: |