I am trying to install Entity Framework 6.1.3 in new asp.net mvc example project.
I go into the "manage nuget packages"-menu - select Entity Framework (latest version). The installation process runs through.
When using my newly created DbContext-class in a controller (for example) I keep getting the following error ..
Could not load file or assembly"EntityFramework, Version=6.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" or one of its
dependencies
I tried to deleted and reinstall entityframework nuget package.. Tried with Nuget Package Manager Console - same error. I also tried Version 6.1.2 - same error.
In my web.config it says the following
<section name="entityFramework"
type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,
EntityFramework, Version=6.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false" />
What should I have to do to make that work ? Why does nuget keeps setting up wrong entries in web.config..
I'm using .net 4.5.2 with Visual Studio 2015 Enterprise
Try to use the Nuget command line to remove the installed version and it's dependencies by running this command Uninstall-Package EntityFramework but you will need to remove the dependent library Microsoft.AspNet.Identity.EntityFramework as well.
Make sure you have the right project(s) selected in the Nugetmanager command window and try this commands in this order:
Uninstall-Package Microsoft.AspNet.Identity.EntityFrameworkUninstall-Package EntityFrameworkInstall-Package Microsoft.AspNet.Identity.EntityFrameworklast command will install last version of EF as well.
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