添加了对System.Data.SQlite.Linq的引用,仍然得到程序集引用丢失错误

时间:2013-03-22 00:52:21

标签: c# .net linq sqlite system.data.sqlite

我正在尝试使用Linq的SQlite,我想手动为我的表添加映射。

为此,我添加了对我的项目的引用(右键单击)引用>添加引用,然后选择此处的两个.dll文件:

C:\Program Files (x86)\System.Data.SQLite\2010\bin

System.Data.SQLite.dll and System.Data.SQLite.Linq.dll

我通过转到Project Properties并在Build选项卡下选择x86,将我的平台目标更改为x86。

我希望能够像System.Data.Linq.Mappings

那样使用Mapping属性

但是当我编译时,我收到以下错误:

Error 1 The type or namespace name 'Linq' does not exist in the namespace 'System.Data.SQLite' (are you missing an assembly reference?)

我确实使用了文件顶部的两个语句: using System.Data.SQLite;

using System.Data.SQLite.Linq

我正在使用Visual Studio 2012。

我被困在这3天了。请帮帮我。

1 个答案:

答案 0 :(得分:0)

前几天我遇到了这样的问题,但是有一个不同的库。我与名称空间冲突有关。您是否尝试删除System.Data.SqlLite并退出System.data.SqlLite.linq,反之亦然?