EF中System.Data.Entity.Internal.AppConfig的类型初始值设定项引发异常

来源:互联网 发布:淘宝零点抢购怎么抢 编辑:程序博客网 时间:2024/05/18 16:38

修改 配置文件 

configSections 节点 必须 在 最上边



<?xml version="1.0" encoding="utf-8" ?><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>  <connectionStrings>    <add name="Default" connectionString="server=192.168.7.7;database=Future;uid=sa;password=123.com;" providerName="System.Data.SqlClient" />  </connectionStrings>  <entityFramework>    <providers>      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />    </providers>  </entityFramework>  <startup>    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />  </startup></configuration>



阅读全文
0 0