相关疑难解决方法(0)

找不到具有不变名称"System.Data.SqlServerCe.4.0"的ADO.NET提供程序的实体框架提供程序

当我使用sqlce 4.0 with entityframework 6.0时出现以下错误

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'
Run Code Online (Sandbox Code Playgroud)

我的app.config看起来像这样

....
<configSections>
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" />
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
  <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections>
 <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" >
      <parameters>
        <parameter value =" System.Data.SqlServerCe.4.0" />
      </parameters>
    </defaultConnectionFactory>
    <!--providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers-->
  </entityFramework>
  <connectionStrings> …
Run Code Online (Sandbox Code Playgroud)

entity-framework sql-server-ce c#-4.0

35
推荐指数
4
解决办法
5万
查看次数

标签 统计

c#-4.0 ×1

entity-framework ×1

sql-server-ce ×1