The element 'entityFramework' has invalid child element Entity Framework

.net c# entity-framework


i create new project web mvc 4 and when i go to tools -> library package manager -> manage nuget solution for package. and installed the Entity Framework. after installing warning show in list is

Warning: The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'.

i am using visual studio 2010 and when go to web.config there was a underline on provider tag


due to warning occour i try my best while finding solution on like

How to resolve Warning : The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'

The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'

but fail what is the reason for this error and how to cope with.

<?xml version="1.0" encoding="utf-8"?>
  For more information on how to configure your ASP.NET application, please visit
    <!-- For more information on Entity Framework configuration, visit -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <add key="webpages:Version" value="" />
    <add key="webpages:Enabled" value="false" />
    <add key="PreserveLoginUrl" value="true" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    <compilation debug="true" targetFramework="4.0" />
        <add namespace="System.Web.Helpers" />
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Web.WebPages" />
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
      <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
        <parameter value="v11.0" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
  <add name="EmployeeContext"
       connectionString = "server=WALEED-PC\UOG; database=sample; Integrated Security=SSPI"

5/23/2017 12:15:41 PM

Accepted Answer

Note: While doing this you have to close visual studio.After completing all process,You have to restart Visual Studio.

Im also faced the same problem.I resolve this error by copying two files like

(1)EntityFrameworkCatalog.xml file (2)EntityFrameworkConfig_6_0_0.xsd


and place those files in

"C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas" folder.

At first download the entire zip file from above link. from that extract the above two files(xml,xsd) from the below location


and copy to

"C:\Program Files\Microsoft Visual Studio 10.0\Xml\Schemas" .

Why because day by day software is updated.Because of that reason we have to work with updated softwares.


You can install the EF6 Designer for VS2012 from " " and it will update the schema that validates config files.

4/18/2014 12:24:01 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow