找不到实体框架方法;版本问题? [英] Entity Framework method not found; version issue?

查看:86
本文介绍了找不到实体框架方法;版本问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发由另一个开发人员构建的系统.运行项目时,在运行时出现以下错误.这是实体框架方法吗?是来自特定版本吗?我不确定如何找到此错误的根源.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆