1

Why SQLite is not available on NuGet? Why it is part of Visual Studio where you have to go look for updates at Tools->Extensions and Updates? I started coding Windows 8 and Windows Phone 8 in the past few months and I like to get some insight into this.

To me, using SQLite on a Windows 8 project creates a VS-level dependency.

Let's say I develop a client library using the version of SQLite referenced by the Visual Studio IDE (Example: 3.7.x) and distribute the library to another developer who uses SQLite 3.8.x referenced by his/her Visual Studio IDE, will my client library still work?

What happened to me last week was this:

I developed a client library for Windows Phone 8 using SQLite and I had to use a 3rd party wrapper written by Peter Huene called sqlite-net-wp8.

It is available at: https://github.com/peterhuene/sqlite-net-wp8/

When you look at the Sqlite.vcxproj file (https://github.com/peterhuene/sqlite-net-wp8/blob/master/Sqlite.vcxproj) of this project, it has references to a given version of SQLite. Looks like every time you update SQLite on Visual Studio, you have to update the .vcxproj file too.

Something like:

<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <Import Project="$(MSBuildProgramFiles32)\Microsoft SDKs\Windows Phone\v8.0\ExtensionSDKs\SQLite.WP80\**3.8.0.2**\DesignTime\CommonConfiguration\Neutral\SQLite.WP80.props" />
  </ImportGroup>

Let's say I develop the client library using 3.8.0.2 and give it to an apps developer who uses the same approach to talk to SQLite (using sqlite-net-wp8) for Windows Phone 8 apps and he/she uses a different version of SQLite (say 3.7.x or even a newer version 3.9.x), will my client library still work? I believe his/her sqlite-net-wp8 may be referring to a different version of SQLite than my client library, breaking the code.

When I updated SQLite 3.7.x to 3.8.x, it forced me to update the Sqlite.vcxproj to go find 3.7 and replace with 3.8 which was not good user experience.

I think ideally it should be backward compatible working with 3.7.x also. But it didn't.

If SQLite and sqlite-net-wp8 is available on NuGet, I can inform the developer who wants to use my client library the version of SQLite and sqlite-net-wp8 I use.

Any idea of overcoming the problem and have better developer experience dealing with the issue?

Volodymyr
  • 1,209
  • 1
  • 15
  • 26
serverfaces
  • 1,155
  • 4
  • 22
  • 49
  • Related: [How to distribute processor-specific WindowsStore assemblies with nuget](http://stackoverflow.com/questions/15726996/how-to-distribute-processor-specific-windowsstore-assemblies-with-nugget) – chue x Sep 25 '13 at 16:19
  • Know that it's an old question, however recently support for Nuget was added and package available [here](https://www.nuget.org/packages/System.Data.SQLite) – Volodymyr Feb 02 '16 at 09:44

1 Answers1

1

I believe the reason SQLite is not available on nuget is that it is a native package so the dll to be used need to be dependent on the target assembly platform which nuget don't seem to support yet

Regarding updating the version of sqlite for your project, you don't need to manually update vcxproj, just use "Add Reference" to remove and readd the reference to Sqlite (it will show up in the Add Reference window under windows ->Extension after you have install the extension)

Benoit Catherinet
  • 3,335
  • 1
  • 13
  • 12