SQLite缺少Visual Studio中的提供程序

编程入门 行业动态 更新时间:2024-10-15 08:21:39
本文介绍了SQLite缺少Visual Studio中的提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我是SQLite的新手,因为安装问题我还不能使用它。 我的目标是在我的VB项目中添加一个ADO.NET实体数据模型对象,并使用DBcontext来操作我的数据。我使用本教程 ADO.NET实体数据模型 [ ^ ]作为起点。我在页面中发布了我的问题,但似乎作者不再监视它了。以下是已完成的工作和正在发生的事情: 我正在使用VS2012。 我使用'SQLite创建了一个SQLite数据库管理员'。 我在VS中安装了教程中指示的NuGet包。 我按照指示安装了System.Data.SQLite(sqlite-netFx45-setup-bundle-x86来自SQLite网站的-2012-1.0.94.0.exe。 我可以在服务器资源管理器中创建连接,因为SQLite提供程序显示在列表中。 尝试时为我的项目添加一个'ADO.NET实体数据模型',我不能再进一步了: 1.我的现有连接(以前创建的)没有显示在下拉控件中 2.选择新连接时,我没有看到SQLite提供者,只看到MS-SQL。 我错过了什么,安装,参考, 无论如何?我需要提供者出现在EDM wizzard中,我该如何处理? 预先感谢您的帮助。

Hi all, I'm new to SQLite, so new that I can't even use it yet due to installation issues:) My goal is to add an 'ADO.NET Entity Data Model' object to my VB project and use a DBcontext to manipulate my data. I used this tutorial ADO.NET Entity Data Model[^] as a starting point. I posted my question in the page but it seems the author is not monitoring it anymore. Here is what has been done and what is happening: I'm using VS2012. I have created a SQLite DB using 'SQLite Administrator'. I installed in VS the NuGet package indicated in the tutorial. I installed System.Data.SQLite as indicated (sqlite-netFx45-setup-bundle-x86-2012-1.0.94.0.exe) from the SQLite web site. I can create a connection in Server Explorer since the SQLite provider shows upin the list. When trying to add an 'ADO.NET Entity Data Model' to my project I cannot go further since: 1. My existing connection (previously created) doesn't show in the dropdown control 2. When choosing 'New Connection' I do not see the SQLite provider, only MS-SQL. Am I missing something, an installation, a reference, whatever else? I need the provider to show up in the EDM wizzard, how do I proceed? Thanks in advance for your help.

推荐答案

我假设您使用的是EF 6. 本文可能会帮助你。此外,您可能需要为EF安装数据提供程序。 I assume you use EF 6. This article may help you. Also, you may need to install data provider for EF.

根据您的建议,这里有适合我的步骤: 对于Visual Studio 2012 :您提到的教程 - 从此链接安装System.Data.SQLite 1.0.94.0 为目标操作系统选择适当的文件和.NET框架版本。 在安装过程中,我选中了所有复选框。 DDEXprovider版本与当前版本匹配很重要您在项目中使用的SQLite EF6 NuGet包! - 从此Microsoft链接 - 安装NuGet包:System.Data。 SQLite.EF6(1.0.94.0)。 EntityFramework会自动安装为此软件包的依赖项。 - 你必须在SQLite提供程序在EDM向导中显示之前构建/重建解决方案。 - 在Project Properties |下验证引用SQLite dll设置为本地复制并实际复制到Bin文件夹。 VS显然会随机将属性设置为False。 - 在App.config中添加DbProviderFactories部分中的提供程序: < add name =SQLite Data Providerinvariant =System.Data.SQLitedescription =.NET Framework Data Provider for SQLitetype =System.Data.SQLite.SQLiteFactory,System.Data.SQLite/> 自2015年2月20日起,此安装对我有用。 Following your advices here are the steps that worked for me: For Visual Studio 2012: Tutorial you referred to - Install System.Data.SQLite 1.0.94.0 from This link Select the appropriate file for target O.S. and .NET framework version. During installation I selected all checkboxes. It is important that the DDEXprovider version matches the version of the current SQLite EF6 NuGet package that you use in your project! - Install Entity Framework 6.1.2 Visual Studio tools from This Microsoft link - Install NuGet package: System.Data.SQLite.EF6 (1.0.94.0). EntityFramework will install automatically as a dependency for this package. - You must build/rebuild the solution before the SQLite provider shows in the EDM wizard. - Verify that under Project Properties | References the SQLite dll's are set to copy locally and actually copied to the Bin folder. VS will apparently randomly set the property to False. - In App.config add a provider in the DbProviderFactories section: <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /> This install worked for me as of 02/20/2015.

更多推荐

SQLite缺少Visual Studio中的提供程序

本文发布于:2023-11-09 04:33:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571415.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   SQLite   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!