System.IO.FileLoadException: 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)
App.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v13.0"/>
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AutoMapper" version="9.0.0" targetFramework="net462" />
<package id="EntityFramework" version="5.0.0" targetFramework="net462" />
</packages>
I tried to uninstall and re install EF do all the Solution hear and i can't change target framework to 5 because i use automaper
Check a couple of things.
EF
installed supports the version of
.Net
you're using.EDIT:
Check your refrences for every EntityFramework.dll
Go and check the version for each one.
I have same problem, i just make sure that i am referencing the correct framework .Net in all the projects in web config
i change this
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
to
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework" requirePermission="false"/>
User contributions licensed under CC BY-SA 3.0