我创建新的项目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)