SQLite connection not appearing in Entity Data Model Wizard (vs2015)

喜欢而已 提交于 2019-12-10 21:43:39

问题


What I did is,

1) Created a project in vs2015 (.Net Framework 4.6) 2) Installed System.Data.SQLite from Nuget. Actually 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) were installed 3) Updated EntityFramework to 6.1.3 in Nuget 4) Tried to create Entity Data Model from a local Sqlite database 5) Rebuilded the whole solution

But when I tried to create a new database connection, SQLite connection was not appearing in the data source.

Can anyone figure out this issue?

<?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:


AFAIK the designer support is not included in the nuget packages of SQLite: you will need to install the package that is indicated for the version of Visual Studio that you are using.

According to the System.Data.SQLite downloads page currently the only package providing designer support in VS 2015 are the Setups for 32-bit Windows (.NET Framework 4.6) sqlite-netFx46-setup-bundle-x86-2015-1.0.105.1.exe (16.93 MiB), which contains the following sentence in its description:

This is the only setup package that is capable of installing the design-time components for Visual Studio 2015.



来源:https://stackoverflow.com/questions/44046937/sqlite-connection-not-appearing-in-entity-data-model-wizard-vs2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!