Forum Xamarin Cross Platform with Xamarin

SQLite ORM solution for MvvMCross

I'm looking for a Sqlite ORM solution that can accept 1:N, 1:1 and N:M relationships mapped on the classes.

I know there's Vici Project (CoolStorage -, but I can't seem to add it to my PCL - Droid project, I'm getting an error in NuGet:
Could not install package 'vici.core'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v2.2', but t he package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I also know about SQLite-Net Extensions by GuillermoGutierrez (, but I have no idea how to use it.

Isn't there any simple solution like ORMLite for java( DB4O is something that I could use, but I had to discard it because I need to use SQLite.

Thanks for any help!


  • GuillermoGutierrezGuillermoGutierrez ESMember ✭✭✭

    I shared my feelings about Cross-platform ORMs in this thread.

    If you're already familiar with SQLite-Net and you want some help handling complex relationships give SQLite-Net Extensions a try.

    If you are looking for a fully featured ORM, Vici Coolstorage seems to be the best option, but configuring it to run is a nightmare, and forget about adding it to the PCL project.

    If you need help with SQLite-Net Extensions please let me know.

  • RafaelMatosRafaelMatos USMember ✭✭

    Yeah, I couldn't even get the Vice Core to install with NuGet! A nightmare indeed....

    Sorry for the n00b question but how do I import the extension (SQLite-Net Extensions), is there a dll or something?

    The documentation is rich in examples of uses, but I couldn't find anything about how to set it up with the project.

  • GuillermoGutierrezGuillermoGutierrez ESMember ✭✭✭

    There's no pre-compiled DLL, you can add the project as a reference to your project or compile the DLL and add it. If you're using MvvmCross it's piece of cake.

  • RafaelMatosRafaelMatos USMember ✭✭

    I couldn't add the project reference, I got an error..

    Here's what I did:

    I unziped only the SQLiteNetExtensions folter

    Then I add it to the solution:

    And then tried to add the reference into the Core (PCL) project.

    Where did I go wrong?

  • GuillermoGutierrezGuillermoGutierrez ESMember ✭✭✭

    Xamarin.iOS plugin doesn't allow adding a reference to a PCL project from a iOS project, but you can ignore that (fake) warning and add it anyway. The easier way is to open the project from Xamarin Studio, add the reference from there and then go back to Visual Studio. As an alternative, you can edit the .csproj file manually and add the reference by hand.

    Once references, VS is going to complain, but you can ignore the PCL related warnings until Xamarin team fixes it up.


Sign In or Register to comment.