小编use*_*774的帖子

元素'entityFramework'具有无效的子元素Entity Framework

我创建新的项目web asp.net mvc 4,当我去工具 - >库包管理器 - >管理nuget解决方案包.并安装了实体框架.在列表中安装警告显示后

警告:元素'entityFramework'具有无效的子元素'providers'.预期可能元素列表:'上下文'.

我正在使用visual studio 2010,当访问web.config时,提供者标签上有一个下划线

</providers>
Run Code Online (Sandbox Code Playgroud)

由于警告发生,我尽力寻找解决方案

如何解决警告:元素'entityFramework'具有无效的子元素'providers'.预期可能元素列表:'contexts'


元素'entityFramework'具有无效的子元素'providers'.预期可能元素列表:'contexts'

但失败的原因是这个错误以及如何应对.
web.config中

<?xml version="1.0" encoding="utf-8"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<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=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <appSettings>
    <add key="webpages:Version" value="2.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" /> …
Run Code Online (Sandbox Code Playgroud)

.net c# asp.net asp.net-mvc entity-framework

7
推荐指数
1
解决办法
1万
查看次数

标签 统计

.net ×1

asp.net ×1

asp.net-mvc ×1

c# ×1

entity-framework ×1