1
votes

Could not load file or assembly 'EntityFramework, Version=5.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)

I am getting this error in VS 2015, when i am executing the application. The application earlier it was in VS 2013 there is no error.

2
Try to install the latest EF or version 5.0.0 specifically. - AT-2017
Try to install EntityFramework Install-Package EntityFramework -Version 5.0.0 - Divyang Desai
@Div - i had updated the Entityframework package like update-Package EntityFramework. if it is wrong let me know. - user3259635
@user3259635 if it is wrong let me know did not get you! - Divyang Desai
@Div - Can i update the Entity framework package like this also right - update-Package EntityFramework. - user3259635

2 Answers

1
votes

Open Package Manager Console and try to install EF.

Toos > Nuget Package Manager > Package Manager Console

Run

PM> install-package entityframework -version 5.0.0.0

Or you can update it to latest version(version 6.1.2) using below command

PM> Update-Package entityframework 
0
votes

I had similar problem. My project's had EF version 6.0, I tried made scaffolding MVC with ef 5.0 and razor views and received this error. I made stop IIS for this web site, clear solution, rebuild solution, fix error, rebuild solution successfuly. Then a try again (make mvc ef scaffolding) and my problem resolved