【问题标题】:SQ-Lite doesn't show as data provider in Visual Studio 2015SQ-Lite 在 Visual Studio 2015 中不显示为数据提供者
【发布时间】:2017-02-20 18:20:09
【问题描述】:

我目前重新安装了 Windows 7,并在此过程中决定从 Visual Studio 2010 升级到 VS 2015。我正在使用 SQ-Lite 开发一个项目(在 C# / WPF 中),现在我可以'不要让 SQ-Lite 与 VS 2015 一起运行,特别是 VS2015 不将 SQ-Lite 识别为数据提供者。

我已采取以下步骤:

  1. 从网站http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki安装了sqlite-netFx46-setup-bundle-x64-2015-1.0.98.0.exe
  2. 在 VS 中(成功)通过 Package-Console 安装 NuGet-Packages System.Data.SQLite.EF6 和 System.Data.SQLite
  3. 在我的 app.config 中,我在 DBProviderFactories 中添加了这一行:

    <add name="SQLite Data Provider (Entity Framework invariant="System.Data.SQLite.EF6"description=".NET Framework Data Provider for SQLite (Entity Framework type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
    
  4. 我已经删除并重新添加了引用、构建/重建项目、重新启动 VS2015、重新启动 Windows 等。

  5. 我检查了是否允许在本地复制相应的 .dll 文件。 (System.Data.SQLite.EF6的.dll不在项目目录下,但是被引用了,不知道是否相关)

此外,我在使用的系统上没有管理员权限,但 VS 2015 和 SQ-Lite 的安装(参见步骤 1)是由管理员完成的,即我自己安装的 NuGet 包。

很明显,我遗漏了一些东西,如果有任何意见,我将不胜感激。如何让 VS 2015 将 SQ-Lite 识别为数据提供者?

【问题讨论】:

    标签: c# sqlite visual-studio-2015


    【解决方案1】:

    尝试安装:

    http://system.data.sqlite.org/downloads/1.0.98.0/sqlite-netFx46-setup-bundle-x86-2015-1.0.98.0.exe

    这是唯一能够安装 Visual Studio 2015 设计时组件的安装包。

    它在 VS 2015 社区中对我有用..

    【讨论】:

    • 谢谢,工作得很好,VS 2015 终于将 SQ-Lite 识别为数据提供者,不幸的是,现在编译器向我显示错误“错误号 CS0234 和 CS0246”,因为它缺少 System.Data 命名空间.有什么想法吗?
    猜你喜欢
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-15
    • 1970-01-01
    相关资源
    最近更新 更多