将SQLiteNetExtension与SQLite-net集成到Xamarin解决方案中

时间:2014-07-16 13:01:48

标签: c# android sqlite xamarin sqlite-net-extensions

我想尝试将SQLiteNetExtension与SQLite-net一起用于Xamarin中的项目。

目前,我创建了一个包含以下内容的解决方案:

  • Android应用程序(用于UI层)
  • Android图书馆计划(包含我的数据,业务层)

我将Nuite Set中的SQLite-net添加到Android Library Project中。 并将SQLiteNetExtension从dll添加到Android库项目中,就像参考一样。

但我尝试使用扩展名中的属性。我得错了:

/Users/David/Developments/TestSqlite/Core.Android/Car.cs(4,4): Error CS0012: The type `SQLite.Net.Attributes.IndexedAttribute' is defined in an assembly that is not referenced. Consider adding a reference to assembly `SQLite.Net, Version=2.2.0.0, Culture=neutral, PublicKeyToken=null' (CS0012) (Core.Android)

我正在使用最新版本的SQLite.cs版本1.0.8:来自https://github.com/praeclarum/sqlite-net 和SQLiteNetExtension来自:https://bitbucket.org/twincoders/sqlite-net-extensions/overview

所以我的问题是,如何在没有构建错误的情况下使用SQLiteNetExtension?

谢谢。

1 个答案:

答案 0 :(得分:3)

我已创建a NuGet package,希望能解决所有与安装相关的问题。