5

Basically my question boils down to if SQLite-Net Extensions (NuGet Link) is compatible with Frank A. Krueger's SQLite-net PCL. As I understand it, at some point Oystein Krog created a fork to improve things in the past (possibly before Frank updated things?), so SQLite.Net PCL came into existence.

Now that there's an "official" PCL version by Frank, I'd like to stick to it instead of the fork. However, it's unclear if SQLite-Net Extensions actually only supports the fork or not. The site says it supports SQLite-net but the dependencies say SQLite.net. Any clarification for my (and future people's) sake would be extremely appreciated!!!

Edit: I know that "SQLite-Net PCL" is just the name of the NuGet package, not actually a standalone PCL. I have this (without SQLite-Net Extensions) fully working in my code within an actual PCL.

Steven_BDawg
  • 796
  • 6
  • 21

3 Answers3

3

There's already a prerelease version (last updated on Saturday, August 13, 2016) for SQLite.Net Extensions-PCL (2.0.0-alpha1) that depends on sqlite-net-pcl (>= 1.1.2) from Frank A. Krueger

https://www.nuget.org/packages/SQLiteNetExtensions/2.0.0-alpha1

danhomp
  • 46
  • 2
2

According to SQLite-Net Extensions documentation there is a flavor which is compatible with Frank A. Krueger's library but there is no nuget package that depends on Frank A. Krueger's nuget package

There is SQLite.Net Extensions-MvvmCross package which doesn't depend on SQLite.Net PCL but it depends on MvvmCross SQLite plugin which is unlisted from nuget.

SQLite-Net Extensions is provided in three different flavours, depending on the SQLite-Net version that you are using:

  • SQLite-Net PCL version (also as NuGet package)
  • SQLite.Net.Async-PCL version (also as NuGet package)
  • MvvmCross SQLite Community version (also as NuGet package)
  • SQLite-Net standard version (also as NuGet package)
Giorgi
  • 30,270
  • 13
  • 89
  • 125
  • Yeah the problem is, that first bullet point points to SQLite.Net PCL not SQLite-Net PCL. However the sentences following those bullets point to potentially using the NuGet originally for SQLite.Net PCL and just referencing it. This is why I'm wanting clarification. – Steven_BDawg Apr 20 '16 at 18:51
  • @Steven_BDawg: Looks like it supports Frank A. Krueger's version but there is no nuget package. You should probably recompile it yourself. – Giorgi Apr 20 '16 at 18:56
  • Seems like it... Any links (whether on SO or not) that could help me do that? I'm still transitioning to VS and C# from Android and am having to learn new things like this along the way lol. – Steven_BDawg Apr 20 '16 at 19:55
  • 1
    @Steven_BDawg: Clone the repo locally and compile it like any other VS project. – Giorgi Apr 20 '16 at 19:55
0

I think that there's a little confusion here, because Frank Krueger nuget package is not a PCL. You can't deploy a PCL library depending on a platform-specific library. Therefore you won't find a SQLite-Net Extensions package that uses that platform specific SQLite.Net nuget package.

However, you can just download the SQLite-Net Extension sources and copy the source files to your project. If you take a look at the sources, you'll see that, unless defined otherwise, it will use the Frank's SQLite package.

#if USING_MVVMCROSS
using SQLiteConnection = Cirrious.MvvmCross.Community.Plugins.Sqlite.ISQLiteConnection;
#elif PCL
using SQLite.Net;
using SQLite.Net.Attributes;
#else
using SQLite;
#endif

I haven't tested in some time, but it should work.

However I'd recommend you to stick to SQLite-Net PCL as it's actively maintained and currently evolving with more features (like asynchronous operations).

redent84
  • 18,901
  • 4
  • 62
  • 85
  • The link I provided (https://www.nuget.org/packages/sqlite-net-pcl/1.1.1) is Frank's nuget package of SQLite-Net FOR a PCL. It was last updated this past January (2016). To use it, you install that same nuget on the PCL as well as the device specific project(s). This nuget by itself is working perfectly fine in my current solution, which is a PCL and a Windows project. Soon I'll add Xamarin.Android and I'm confident it will work there too. However, if I can add SQLite-Net Extensions to the mix, life would be even better. – Steven_BDawg Apr 21 '16 at 20:17
  • To be clear, I know that the link provided is not a PCL by itself. Rather, it's just the actual name of the NuGet when you pull it up on the manager or go to the site. – Steven_BDawg Apr 21 '16 at 20:18