错误定义了一个重复的“entityFramework”部分 [英] error There is a duplicate 'entityFramework' section defined

查看:198
本文介绍了错误定义了一个重复的“entityFramework”部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误:

Config Error       There is a duplicate 'entityFramework' section defined
Config File    \\?\D:\koopaproject\koopaproject\web.config
9: <!--For more information on Entity Framework configuration, visit     http://go.microsoft.com/fwlink/?LinkID=237468--> 
10:  <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />11:   </configSections>

在我的web.config中:

In my web.config:

<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=b77a5c561934e089" requirePermission="false"/>
</configSections>

<connectionStrings>
    <add name="koopaco.com_koopaContext" connectionString="Data Source=localhost;Initial   Catalog=koopaco.com_koopa;Persist Security Info=True;User ID=koopaco.com_zohre;Password=136613;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
</connectionStrings>

我安装了:

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
    </dependentAssembly>
</assemblyBinding>

但我仍然收到此错误。

推荐答案

将其添加到web.config文件

Add this to web.config file

<entityFramework xdt:Transform="RemoveAll" />

这篇关于错误定义了一个重复的“entityFramework”部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆