找不到实体框架方法;版本问题? [英] Entity Framework method not found; version issue?
问题描述
我正在开发由另一个开发人员构建的系统.运行项目时,在运行时出现以下错误.这是实体框架方法吗?是来自特定版本吗?我不确定如何找到此错误的根源.
I'm working on a system built by another developer. When I run the project I get the following error at run time. Is this an Entity Framework method? Is it from a specific version? I'm not sure how to track down the source of this error.
System.MissingMethodException:找不到方法:'Void System.Data.Entity.ModelConfiguration.EntityTypeConfiguration`1.ToTable(System.String)'.
推荐答案
我过去所看到的是,解决方案中的不同项目引用了不同版本的EF.我将遍历每个项目,并确保它们引用相同版本的EF.
What I have seen happen in the past, is different projects in the solution referencing different versions of EF. I would go through each project, and make sure they reference the same version of EF.
或者只需右键单击
解决方案->管理NuGet程序包->更新->实体框架
这会将所有项目更新为最新的EF.
and this will update all of the projects to latest EF.
这篇关于找不到实体框架方法;版本问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!