Tuesday, February 4, 2014

Could not load file or assembly EntityFramework, Version=6.0.0.0 and MVC 4

In MVC 4 this mostly happens when you create a MVC 4 project and then for your DAL (Data access layer ) you have a separate class library project and install EF through NuGet. NuGet will give you the latest version which is currently EF 6. When you try to run the project you will see an error similar to the above with a yellow screen of death. The root cause is that MVC 4 has  EF5 referenced. So just open up NuGet and upgrade  EF to version 6 under updates section and you are good to go.

0 comments:

Post a Comment