title: Code First can't enable migrations
body: <p>I'm trying to enable migrations but it's throwing an exception:</p>
  
  <blockquote>
    <p>Checking if the context targets an existing database...
    System.TypeInitializationException: The type initializer for 'System.Data.Entity.Migrations.DbMigrationsConfiguration`1' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: The 'name' attribute must be specified on the 'section' tag.</p>
  </blockquote>
  
  <p>I'm assuming that the App.config file is not correctly set up (it was automatically set up when I added EF package). All I did was add the connection string:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
    &lt;configSections&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;!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --&gt;&lt;/configSections&gt;
  
   &lt;connectionStrings&gt;
     &lt;add Name="MyContext" connectionString="data source=MYSERVER;initial catalog=CodeFirstTest;user id=***;password=***;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" /&gt;
   &lt;/connectionStrings&gt;
  
   &lt;entityFramework&gt;
     &lt;defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"&gt;
       &lt;parameters&gt;
         &lt;parameter value="v11.0" /&gt;
       &lt;/parameters&gt;
     &lt;/defaultConnectionFactory&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>I'm using SQL Server 2008 R2.</p>
  
  <p>As I do have a connection string, I don't believe I need the defaultconnectionfactory. Am I correct? (Note: Even without this section I'm still getting the same exception)</p>
  
  <p>What else am I missing?</p>