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: Method not found: 'Void System.Data.Entity.ModelConfiguration.EntityTypeConfiguration`1.ToTable(System.String)'.
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.
Or simply right click on
Solution -> Manage NuGet Packages -> Updates -> Entity Framework
and this will update all of the projects to latest EF.
The EntityTypeConfiguration<T>.ToTable(String)
method is new in the Entity Framework 5 which is the first release of EF that is separate from the rest of the .NET Framework.
Your project/solution is probably referencing the Entity Framework built-in to the .NET Framework which would be version 4. Ensure you have the correct EF binaries referenced.
Had to restart Visual Studio in my case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With