Search code examples
c#androidsqlitexamarinsqlite-net-extensions

Integrate SQLiteNetExtension with SQLite-net into a solution Xamarin


I want to try using SQLiteNetExtension with SQLite-net for a project in Xamarin.

For the moment, I create a solution which contains :

  • an Android Application (for the UI layer)
  • an Android Library Project (which contains my data, business layer)

I add SQLite-net from NuGet Package into Android Library Project. And added SQLiteNetExtension from a dll into Android Library Project like a reference.

But I try to use attribute from the extension. I get erros like :

/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)

I'm using the lastest version of SQLite.cs version 1.0.8 : from https://github.com/praeclarum/sqlite-net And SQLiteNetExtension from : https://bitbucket.org/twincoders/sqlite-net-extensions/overview

So my problem is, how can I use SQLiteNetExtension without build error ?

Thank you.


Solution

  • I've created a NuGet package that will hopefully solve all installation-related issues.