Visual C# 2010 的 SQLite 安装问题

发布于 2024-10-30 23:21:47 字数 499 浏览 1 评论 0原文

我正在尝试使用 SQLite 在 Visual C# 2010 中创建数据库,但是当我选择“SQLite 数据库文件”时,我没有机会指向数据库文件。我收到一个对话框,要求我提供连接字符串。我无法提供一个不会给出错误“无法加载文件或程序集'Microsoft.VisualStudio.Data,version=9.0.0.0,PublicKeyToken=...'找到的程序集清单”的连接字符串定义与汇编参考不匹配。”

据我了解,这是由于 Visual Studio 的数据工具安装不成功,但我尝试卸载并重新安装,但无济于事。我能找到的唯一相关线程是 http:// www.basarat.com/2010/05/sqlite-for-visual-studio-2010.html

我使用了最新的SQLite-1.0.66.0-setup。有人有什么想法吗?

I'm trying to use SQLite to make databases in visual c# 2010 but when I select "SQLite Database File" I don't get the opportunity to point to a database file. I get a dialog that asks me for a connection string. I have not been able to come up with a connection string that doesn't give me the error "Could not load file or assembly 'Microsoft.VisualStudio.Data, version=9.0.0.0, PublicKeyToken=...'The located assembly's manifest definition does not match the assemble reference."

I've learned that this is due to the data tools for Visual Studio were not successfully installing, but I've tried uninstalls and reinstalls to no avail. The only relevant thread I could find was at http://www.basarat.com/2010/05/sqlite-for-visual-studio-2010.html

I used the latest SQLite-1.0.66.0-setup. Does anyone have any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

ぶ宁プ宁ぶ 2024-11-06 23:21:48

可能会也可能不会解决您的问题。这是我的 博客文章 根据我几天前在 Visual Studio 2010 中安装最新 SQLite 的经验:

来自 sqllite.org 的 System.Data.SQLite .NET 程序集的当前二进制安装程序不包括 Visual Studio 设计器或在服务器资源管理器中使用 SQLite 所需的 ADO.NET 驱动程序。这是我发现的正确设置环境的最佳组合。

1. 从 sourceforge.net 下载并安装版本 1.0.66.0,因为 SQLite.org(位于 system.data.sqlite.org)上当前的二进制安装不包括 Visual Studio 设计器或 ADO.NET 驱动程序安装。

2.从system.data.sqlite.org下载并安装最新版本(x86和x64)(当前为1.0.73.0,其中包含SQLite 3.7.6.3引擎)。
重要提示:如果您有 Visual Studio 2008 和 2010,请务必在出现提示时选择两者,因为我发现其他遇到问题的其他人的报告。

3.将 x86 二进制文件复制到 C:\Program Files (x86)\SQLite.NET\bin 并覆盖文件(假设您使用版本 1.0.66.0 的默认安装位置并且运行 x64 Windows)。如果您使用的是 x64 机器,请将 x64 二进制文件复制到 C:\Program Files (x86)\SQLite.NET\bin\x64 目录,覆盖现有文件。

May or may not solve your problem. Here's from my blog post on my own experience with getting the latest SQLite up and going in Visual Studio 2010 a few days ago:

The current binary installers from sqllite.org for the System.Data.SQLite .NET assembly do not include the Visual Studio designers or the ADO.NET driver required for use of SQLite in the Server Explorer. So here’s the winning combination I’ve found for getting my environment set up properly.

1.Download and install version 1.0.66.0 from sourceforge.net because current binary installs on SQLite.org at system.data.sqlite.org do not include the Visual Studio designer or ADO.NET driver install.

2.Download and install the latest versions (x86 and x64) from system.data.sqlite.org (currently 1.0.73.0 which contains the SQLite 3.7.6.3 engine).
Important Note: If you have Visual Studio 2008 and 2010, be sure to choose both when prompted as I found reports from others who had problems otherwise.

3.Copy the x86 binaries into and overwriting file at C:\Program Files (x86)\SQLite.NET\bin (assuming you used the default install location for version 1.0.66.0 and you're running x64 Windows). And if you are on an x64 box, copy the x64 binaries to the C:\Program Files (x86)\SQLite.NET\bin\x64 directory, overwriting existing files.

天气好吗我好吗 2024-11-06 23:21:48

尝试将这些行添加

<dependentAssembly>   
  <assemblyIdentity name="Microsoft.VisualStudio.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />   
  <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="10.0.0.0" />   
</dependentAssembly> 

到文件 C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\.config

然后重新启动 Visual Studio。

Try add these lines

<dependentAssembly>   
  <assemblyIdentity name="Microsoft.VisualStudio.Data" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />   
  <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="10.0.0.0" />   
</dependentAssembly> 

to the file C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\.config

Then restart Visual Studio.

温柔女人霸气范 2024-11-06 23:21:48

请参阅这篇 sqlite 论坛文章。连接字符串主要包括文件名和一些选项。例如:

"Data Source=mydb.db;Version=3;New=True;"

这将使用 mydb.db 作为您的 sqlite 数据库,并使用版本 3.0 运行时库(最好),并且将创建一个 New db 文件(如果它不存在)。

See this sqlite forum article. The connection string basically includes the filename and some options. Eg:

"Data Source=mydb.db;Version=3;New=True;"

This would use mydb.db as your sqlite database and use the version 3.0 runtime library (best) and would create a New db file if it did not exist.

油饼 2024-11-06 23:21:48

下载 SQLite 二进制文件 ,解压 zip,导航到“bin/Designer”文件夹并运行 install.exe。也许这会有所帮助。

Download SQLite binaries , extract zip, navigate to "bin/Designer" folder and run install.exe. Maybe this will help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文