【问题标题】:Entity Framework Version=6.0.0.0 error实体框架版本=6.0.0.0 错误
【发布时间】:2016-01-15 15:30:28
【问题描述】:

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

我的配置文件是:

    <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>

如何修复错误?

【问题讨论】:

  • 检查你的包文件夹。你有 EntityFramework.6.1.3 在 lib\net45 文件夹中有 EntityFramework.dll 的副本吗?如果没有,请从 Nuget 重新安装 EF。
  • 我检查它。我有一个包裹。项目正在本地运行但未运行服务器。请帮忙
  • 服务器/bin文件夹下的EntityFramework.dll吗?你在使用像 teamcity 这样的构建服务器吗?这可能更像是一个 Nuget 问题。看看 Nuget 包还原。 blog.davidebbo.com/2014/01/…
  • 是服务器/bin文件夹下的entityframework.dll。我试过了,但没有跑。

标签: c# entity-framework web-config


【解决方案1】:
 <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

【讨论】:

猜你喜欢
  • 2016-10-17
  • 1970-01-01
  • 1970-01-01
  • 2013-06-16
  • 2017-03-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多