【问题标题】:Integrate SQLiteNetExtension with SQLite-net into a solution Xamarin将 SQLiteNetExtension 与 SQLite-net 集成到解决方案 Xamarin
【发布时间】:2014-07-16 13:01:47
【问题描述】:

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

目前,我创建了一个解决方案,其中包含:

  • Android 应用程序(用于 UI 层)
  • 一个 Android 库项目(包含我的数据、业务层)

我将 NuGet 包中的 SQLite-net 添加到 Android 库项目中。 并将 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 而不出现构建错误?

谢谢。

【问题讨论】:

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


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2019-07-25
      • 2015-05-11
      • 2010-12-17
      • 2018-10-14
      • 2012-07-13
      • 1970-01-01
      • 2018-04-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多