-
Notifications
You must be signed in to change notification settings - Fork 97
Sort out SQLite redistribution #237
Comments
@ericstj, do you know of any new (since our last conversation) packaging techniques that might help in this situation? |
I am a little surprised NuGet 3.x doesn't have the needed ability to differentiate. But I haven't dived deep into NuGet 3 issues just yet. (I am currently doing some major changes to SQLitePCL.raw, but I am staying with NuGet 2.x for this round.) I agree that a SQLite native code NuGet package which is (1) maintained by the SQLite team, and (2) doesn't need fancy MSBuild magic would be Most Excellent. |
Would be nice to distribute native sqlite3 via nuget for linux. This would alleviate errors such as dotnet/efcore#5100 |
For now assigning to @natemcmaster who has been doing some investigation on this area. |
I have opened a request for CoreFX to add a WinRT rid into the runtime graph. If they put in this feature, we may be able to avoid using MSBuild to solve the WinRT/Win32 issue for sqlite3.dll and rely on NuGet to handle this correctly.
|
As of #250, Microsoft.Data.Sqlite now takes a dependency on the "sqlite" package, version 3.12.2. https://www.nuget.org/packages/sqlite. The package includes native libraries for all platforms where .NET Core 1.0 RC2 is supported. This includes:
Microsoft.Data.Sqlite takes a dependency on this directly, however other packages and apps can install this package and use SQLite via the C API and P/Invoke. Example: public class NativeMethod
{
[DllImport("sqlite3", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr sqlite3_libversion();
} Special thanks to @mistachkin for collaborating with us to create the package. |
Niiiiiiiiiiice!!! |
We currently redistribute SQLite, but only for UWP and Windows. On OSX and Linux, we assume it is already installed globally.
Ideally, we'd like to get out of the business of redistributing SQLite, and either (1) do nothing (not the best experience on Windows), or (2) depend on an official, SQLite-owned NuGet package.
We tried, with the SQLite team, to produce a NuGet 3 package--sqlite--for redistributing it, but there was no way do differentiate between a native library that can only run inside of an App container (the WinRT/UWP ones) and the other ones (Win32). (See this conversation.) NuGet 3 also fails to handle Full .NET, AnyCPU apps. (See NuGet/Home#904.) We currently do some fancy MSBuild magic in our package to workaround these. We should work with the NuGet and .NET Core teams to figure out a best practice to use in this situation. Then try again with the SQLite team to produce a package that works with Full .NET, UWP, and .NET Core.
cc @mistachkin, @ericsink, @timheuer
The text was updated successfully, but these errors were encountered: