The type initializer for System.Data.Entity.Internal.AppConfig" threw an exception

When learning the small case of EF code First, I encountered this exception

  <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>
  <connectionStrings>
    <add name="EFDbContext" connectionString="Server=.;Database=MiniProfilerDemo;uid=sa;pwd=tfc063318;" providerName="System.Data.SqlClient" />
  </connectionStrings>

solution:

The <connectionStrings> tag must come after <configSections>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325163423&siteId=291194637