SQLite连接在Entity Data Model向导(vs2015)中不可见

3
我所做的是:
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数据库创建Entity数据模型
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 Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
1个回答

4
据我所知,NuGet软件包中不包含SQLite的设计师支持功能。您需要安装适用于您使用的Visual Studio版本的包。System.Data.SQLite下载页面表示,目前唯一在VS 2015中提供设计师支持的软件包是“Setups for 32-bit Windows (.NET Framework 4.6) sqlite-netFx46-setup-bundle-x86-2015-1.0.105.1.exe (16.93 MiB)”,其中在其描述中包含以下语句:

这是唯一一个能够为Visual Studio 2015安装设计时组件的设置程序包。

那么下载 sqlite-netFx46-setup-bundle-x86-2015-1.0.105.1.exe 是不是意味着不需要下载 NuGet 包了,还是两者都需要下载?如果是后者,为什么两者都需要? - Jacob Stamm
@JacobStamm:答案也在上述下载页面中: 安装程序包仅适用于开发人员机器,仅在需要Visual Studio设计时组件时才安装。理论上,它们也可以安装在客户机器上;但是,不建议使用此类部署。 此外:仅包含设计时组件的软件包为32位,我相信您仍然希望在某些情况下使用64位库... - xtoik

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接