Entity Framework method not found; release version?

I am working on a system created by another developer. When I run the project, the following error appears at runtime. Is this an Entity Framework method? Is it from a specific version? I am not sure how to trace the source of this error.

System.MissingMethodException: Method not found: 'Void System.Data.Entity.ModelConfiguration.EntityTypeConfiguration`1.ToTable (System.String)'.

+3


source to share


3 answers


What I have seen in the past are different projects in the solution referencing different versions of EF. I would go through each project and make sure they link to the same version of EF. Or just right click on Solution -> Manage NuGet Packages -> Updates -> Entity Framework and this will update all projects to the latest EFs.



+8


source


The method EntityTypeConfiguration<T>.ToTable(String)

is new in Entity Framework 5, which is the first version of EF to be decoupled from the rest of the .NET Framework.



Your project / solution is probably referencing the Entity Framework built into the .NET Framework, which will be version 4. Make sure you include the correct EF binaries.

+1


source


Will have to restart Visual Studio in my case.

+1


source







All Articles