相关疑难解决方法(0)

对于EF 6和SQLite 1.0.96.0,"找不到实体框架提供程序"

我知道在这个主题上已经有几个类似的问题了,但是其中很多都来自SQLite的旧版本,据我所知,它并没有完全支持EF 6.我已经尝试过这些线程的无数建议,要么是做错了,要么是必须改变的.

我正在使用VS 2013,面向.NET 4.5.1,并已从system.data.sqlite.org下载页面安装了sqlite-netFx451-setup-bundle-x86-2013-1.0.96.0.exe软件包,以及来自NuGet Manager的System.Data.SQLite EF6包(安装EF6).

下面是我当前的App.config文件(除了我尝试将Version,Culture和Public键变量添加到类型中之外,它几乎没有变化):

<?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>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="mssqllocaldb" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6, Version=1.0.96.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite.EF6" />
      <add name="SQLite Data Provider (Entity Framework …
Run Code Online (Sandbox Code Playgroud)

c# sqlite entity-framework entity-framework-6

41
推荐指数
3
解决办法
3万
查看次数

数据库首先使用system.data.sqlite 1.0.93创建实体框架6.1.1模型

我有一个项目,我刚刚使用nuget更新.这个更新的实体框架从6.1到6.1.1,它将sqlite更新为1.0.93.我想从我最新的数据库更新我的模型.我做了以下步骤:1)数据库模型2)选择sqlite数据库3)生成

生成后,我收到以下错误消息,如下所示.我安装了1.0.93设计时组件.有谁知道究竟是什么导致了这个错误.项目引用和版本都与上面显示的版本匹配.

错误信息:

您的项目引用了最新的实体框架; 但是,无法为您的数据连接找到与此版本兼容的Entity Framework数据库提供程序.

更新:

我最终使用包管理器控制台手动安装6.1.0

Install-Package EntityFramework -Version 6.1.0

然后在我的csporj文件中替换

包\ EntityFramework.6.1.1

包\ EntityFramework.6.1.0

我尝试从数据库和代码优先从数据库创建EF Designer但我仍然得到相同的错误.

UPDATE

我已按照汤姆提供的指示行事,感谢您抽出宝贵时间深度回应,感谢您的光临.但我不能让实体框架设计师使用SQLite 1.0.93.我发现了什么:

1)当我在Tom描述的工具菜单中添加SQLite数据源时,我看到了SQLite数据提供程序.

工具>连接到数据源

2)但是当我重新启动visual studio时,数据源没有连接

重启后连接丢失

3)数据源可以刷新,重启后有效

刷新后会显示表格

4)添加新数据项但SQLite未列为提供者

SQLite未列为提供者

我已经仔细检查了注册表,EF6被附加到不变名称,SQLite dll在GAC中注册.我会试着看看还能找到什么但是在这一点上我不知道该找什么.作为旁注,我尝试过dotConnect,但它对EF 6.1.1无效.

更新2

有没有人知道Entity Framework Designer是否有一个日志选项来找出可能发生的事情?

sqlite entity-framework

20
推荐指数
3
解决办法
3万
查看次数

SQLite连接未出现在实体数据模型向导中(vs2015)

我做的是,

1)在vs2015中创建了一个项目(.Net Framework 4.6)2)从Nuget安装了System.Data.SQLite.实际上是System.Data.SQLite(1.0.105.1),System.Data.SQLite.Core(1.0.105.1),System.Data.SQLite.EF6(1.0.105.1),System.Data.SQLite.Linq(1.0.105.1) ,安装了EntityFramework(6.0.0)3)在Nuget中更新了EntityFramework到6.1.3 4)试图从本地Sqlite数据库创建实体数据模型5)重新构建整个解决方案

但是当我尝试创建新的数据库连接时,SQLite连接没有出现在数据源中.

有人能解决这个问题吗?

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configsections>

<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />

<entityframework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />


<system.data>
<dbproviderfactories> 
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" />
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework …
Run Code Online (Sandbox Code Playgroud)

c# sqlite entity-framework-6

3
推荐指数
1
解决办法
1507
查看次数

标签 统计

sqlite ×3

c# ×2

entity-framework ×2

entity-framework-6 ×2