与2010年VS源码
我工作的一个项目,我需要使用一些database.I选择了SQLite的,因为它容易为use.But的IM遇到了一些麻烦得到它使用System.Data.SQLite从 http://sqlite.phxsoftware.com/ 但是当我尝试运行程序我得到下面的异常message.I M编码C#和Visual Studio 2010。
I'm working on a project and i need to use some database.I chose SQLite because of its easiness to use.But im having some trouble to get it work.I'm using System.Data.SQLite from http://sqlite.phxsoftware.com/ but when i try to run the program i get the following exception message.I'm coding C# with Visual Studio 2010..
无法加载文件或程序
'System.Data.SQLite,版本= 1.0.66.0,
区域性=中性,
公钥= 1fdb50b1b62b4c84,
可重定向=是或它的
依赖关系之一。给定的程序集名称
或基本代码无效。 (从HRESULT异常
:0x80131047)。
Could not load file or assembly 'System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=1fdb50b1b62b4c84, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
我不知道为什么我得到这个问题以及如何处理它。
I dont know why i get this and how to handle it.
我一定要得到这个项目准备明天需要你的帮助......
I have to get this project ready for tomorrow and need your help...
当您添加到 System.Data.SQLite
程序集的引用,请确保您的复制本地属性设置为true:
When you add a reference to the System.Data.SQLite
assembly, make sure you set the property of "Copy Local" to true:
- 右键单击该程序集
System.Data.SQLite
- 更改复制本地设置为True
与另外的 Dillie-O的回答应该在2010以内的VS净V4.0框架运行SQLite的。
This with the addition of Dillie-O's answer should get SQLite running on the .Net v4.0 Framework within VS 2010.