How to solve this error - can anyone provide a solution?

-4

Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

c#
sql
entity-framework
asked on Stack Overflow Nov 22, 2018 by M Tanveer Sultan • edited Nov 22, 2018 by marc_s

1 Answer

0

Had same problem. Finally got to know the reason that EntityFramework assembly reference in 2 projects were different. Made them same (6.0) and it worked.

Also check with below solution.

First check which version EF you using. Check the your version. If you want to upgrade your version you can manage EF upgrade from NuGet.

Go to your Project solution - > 'Manage NuGet packet for Solution', click 'Manage' on 'Entity Framework'.

Now, Check your app.config . Maybe here wrong version number. The name="entityFramework" should have the correct version number.

answered on Stack Overflow Nov 22, 2018 by A.M. Patel

User contributions licensed under CC BY-SA 3.0