.net 4.0 &引用;“Ado.Net实体数据模型”;VS2010、EF6和SQLite EF6提供程序的模板?

.net 4.0 &引用;“Ado.Net实体数据模型”;VS2010、EF6和SQLite EF6提供程序的模板?,.net-4.0,entity-framework-6,system.data.sqlite,ado.net-entity-data-model,.net 4.0,Entity Framework 6,System.data.sqlite,Ado.net Entity Data Model,当我为未来指定XP兼容性的项目做宣传时,我正在尝试测试VS 2010(WinXP SP3)、.Net 4.0.3(后来的UI WPF)、Entity Framework 6(我发现它应该与.Net 4兼容)和SQLite(System.Data.SQLite/.EF6)的组合 我从NuGet安装了“EntityFramework”和“System.Data.SQLite EF6”包。 (“System.Data.SQLite EF6”依次安装System.Data.SQLite、System.D

当我为未来指定XP兼容性的项目做宣传时,我正在尝试测试VS 2010(WinXP SP3)、.Net 4.0.3(后来的UI WPF)、Entity Framework 6(我发现它应该与.Net 4兼容)和SQLite(System.Data.SQLite/.EF6)的组合

我从NuGet安装了“EntityFramework”和“System.Data.SQLite EF6”包。 (“System.Data.SQLite EF6”依次安装System.Data.SQLite、System.Data.SQLite.EF6和SQLite.Interop.dll)

现在尝试使用“Ado.Net实体数据模型”模板,我从以前的教程中猜到,这将是我进入“新建连接”对话框的下一步,这里没有列出可供选择的SQLite提供程序

我检查了我的App.config,那里列出了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 -->
    <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.0.3,Profile=Client" />
  </startup>
  <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" />
      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="System.Data.SQLite" />
      <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" />
      <add name="SQLite Data Provider" 
           invariant="System.Data.SQLite" 
           description=".Net Framework Data Provider for SQLite" 
           type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
    </DbProviderFactories>
  </system.data>
</configuration>

应用程序(空控制台应用程序)编译时没有错误并运行(当然什么也不做)

我对EF+SQLite非常了解,所以请您提供建议好吗?

我是不是完全走错路了?

因此,在又一次绝望的谷歌搜索了几个小时之后,我在一篇关于
Visual Studio设计时组件的老教程中找到了一个提示

显然,我缺少设计时组件以及安装在GAC中的System.Data.SQLite libs,没有这些组件,VS2010向导无法“看到”SQLite提供程序。
因此,尽管在许多官方网站上都读到安装包不是将SQLite LIB引入项目的推荐方法,但它实际上是使VS(2010,12,13?)工具与之协同工作的唯一方法

我从中安装了一个“安装程序”程序包。在我的例子中是“32位Windows(.NET Framework 4.0)的设置”。
该模板现在提供SQLite作为数据提供者