实体框架版本= 6.0.0.0错误

时间:2016-01-15 15:30:28

标签: c# entity-framework web-config

我安装了实体框架版本6.1.3。我有一个无法加载文件或程序集' EntityFramework,Version = 6.0.0.0,Culture = neutral error。

我的配置文件是:

    <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=6.0.0.0, Culture=neutral, PublicKeyToken=1934e089" requirePermission="false"/>
  </configSections>
  <!--
    For a description of web.config changes see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5" />
      </system.Web>
  -->
  <system.web>
    <customErrors mode="Off"/>
    <pages validateRequest="false" enableEventValidation="false" enableViewStateMac="false"  viewStateEncryptionMode="Never" controlRenderingCompatibilityVersion="4.0"/>
    <compilation targetFramework="4.5">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B11D50A3"/>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7A93408"/>
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=03F1D5A3"/>
        <add assembly="PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=1BF564E3"/>
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=1BF3D3E3"/>
      </assemblies>
    </compilation>
    <httpRuntime/>
    <!--<compilation debug="true"/>-->
  </system.web>

如何修复错误?

1 个答案:

答案 0 :(得分:0)

 <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=1934e089" requirePermission="false"/>

的版本号为6.0.0.0。将其更改为6.1.3.0