title: How to resolve Warning : The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'
body: <p>I'm playing around with EF different workflows. Yesterday I made a new project and <code>Entity Framework 6</code> was the first suggestion from <code>Nuget</code> so I decided to give it a try, also it is a very small project entirely for learning purposes so I guess it will be good experience to try <code>EF 6</code> since I've been working mostly with <code>Ef 5</code>.</p>
  
  <p>My Application is based on <code>Code First</code> approach. The structure of the solution is shown in the print screen:</p>
  
  <p><img src="https://i.stack.imgur.com/c6Jgd.png" alt="Solution Tree"></p>
  
  <p>The project <code>CodeFirstClasses</code> is meant to hold my Entites. For simplicity purposes and because I follow a tutorial I use only one class as you may see - <code>Customer.cs</code>. There I have :</p>
  
  <pre><code>public class RewardContext : DbContext
      { 
          //Specify the name of the base as Rewards
          public RewardContext() : base("Rewards")
          { 
          }
  
          //Create a database set for each data item
          public DbSet&lt;Purchase&gt; Purchases { get; set; }
          public DbSet&lt;Customer&gt; Customers { get; set; }
  
      }
  </code></pre>
  
  <p>And the other classes - <code>Purchase</code> and <code>Customer</code> which are trivial, so I won't paste them here.</p>
  
  <p>The other project as you can see is <code>Windows Forms</code> project with just one form and button on it. On the <code>click</code> event of the button I have all the logic for adding new records to my two entities hardcoded. Here is just a part of it:</p>
  
  <pre><code>    //some code...
      //Add the record and save it
      context.Customers.Add(newCustomer);
      context.Purchases.Add(newPurchase);
      context.SaveChanges();
  
      MessageBox.Show("Record Added!");
  </code></pre>
  
  <p>So far nothing different from what I'm used to with <code>EF 5</code>. I can build the project, I can run it, and everything is executed as expected. However I get this warning from the title : </p>
  
  <p><code>Warning    1 The element 'entityFramework' has invalid child element 'providers'. List of possible elements expected: 'contexts'.</code> And even though I'm using mostly <code>MS SQL Server Management Studio</code> I've noticed that I'm not able to manage my connections/databases from the IDE - <code>Visual Studio 2012</code>, but this was not an issue with <code>EF 5</code>.</p>
  
  <p>My research narrowed down the possible source of problem/solution to manually changing the <code>App.config</code> file, but this is an area where I haven't got much experience especially when the IDE took care of it until <code>EF 6</code>. So I'll post both my <code>App.config</code> files for this solution :</p>
  
  <p>The one from the <code>CodeFirstClasses</code> project :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>And from my <code>TestCodeFirst</code> project:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;
      &lt;section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /&gt;
    &lt;/configSections&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
    &lt;entityFramework&gt;
      &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /&gt;
      &lt;providers&gt;
        &lt;provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /&gt;
      &lt;/providers&gt;
    &lt;/entityFramework&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>And the other possible solution that I found is : <code>updating the xsd for "validating" EF config section in web/app.config file to recognize newly added EF6 elements</code> which I'm also not aware of how exactly to do it.</p>
  
  <p>Even though when I open the <code>MS SQL Server Management Studio</code> I see the database created for this application, the records are saved and generally it seems to work but yet I would like to resolve this warning and get to know how to set up my applications based on <code>EF 6</code> right.</p>