3

I installed EF6 and then realized MySQL has yet to provide support for it on their Connector/Net. So Naturally I rolled back and now I'm getting the error cited in the title.

My app.config looks like this

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  </configSections>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>

and my references look like:

Name: EntityFramework.dll
Created By: Microsoft Corporation
Verison: 5.0.20627.0

Additionally I have referenced the following assemblies:

Name: System.Data
Version: 4.0.0.0
File Version: 4.030319.17929

Name: System.Data.Entity
Version: 4.0.0.0
File Version: 4.030319.17929

The Exact text of the Exception I get is:

An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=4.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)

How can I fix this??

2
  • 1
    Yesterday i've answered on the same question. Look [this][1] [1]: stackoverflow.com/questions/19711591/… Commented Nov 1, 2013 at 5:15
  • @Alexander Thank you. It worked. Reinstalled EF and clean all worked. And here I spent a couple of hours trying to work my way around that. In less than 60 seconds I was done. Commented Nov 1, 2013 at 5:32

1 Answer 1

2

Your configuration refference version and installed versions are mismatch.You should change the following line of code ,because of you refference entityframework version 5.0.0.0 dll.So just try with replacing following line of code.

<section name="entityFramework" 
          type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
          requirePermission="false" />
Sign up to request clarification or add additional context in comments.

1 Comment

Crud. Thanks, I did try that and it didn't work. Had to revert to what Alexander said in a comment. Reinstall the whole damned thing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.