[英]Getting an error from Entity Framework(type initializer exception)
I' am getting this: 我得到这个:
The type initializer for 'System.Data.Entity.Internal.AppConfig' threw an exception. “ System.Data.Entity.Internal.AppConfig”的类型初始值设定项引发了异常。
error in my Entity Framework. 我的实体框架出现错误。
I read this Question and the possible answers, however non of them worked for me. 我读了这个问题和可能的答案,但是没有一个对我有用。 Here is my App.config file: 这是我的App.config文件:
<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="SalesReportEntities"
connectionString="metadata=res://*/SalesReportModel.csdl
|res://*/SalesReportModel.ssdl
|res://*/SalesReportModel.msl;
provider=System.Data.SqlClient;
provider connection string="data source=.;
initial catalog=Training;
integrated security=True;
MultipleActiveResultSets=True;
App=EntityFramework""
providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
What other possible things can cause this error? 还有哪些其他可能的原因导致此错误?
I can offer a few suggestions and some are similar to the thread you already looked at: 我可以提供一些建议,其中一些与您已经看过的线程类似:
You may also want to post the entire exception for better answers too. 您可能还希望发布整个异常,以获得更好的答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.