Reputation: 18802
I'm trying to get SQLite working in a Universal Windows App targeting UAP v10 using Visual Studio 2015 (RTM).
I've installed the Visual Studio Extension, "SQLite for Universal App Platform" and referenced it (and "Visual C++ 2015 Runtime for Universal Windows Platform Apps") from my project.
I've then added System.Data.SQLite via NuGet, which appears to work as a reference to it gets added to my project and I don't see any error messages. However, I don't appear to get any DLLs added to my project through this process.
Upon further investigation, it looks as though the System.Data.SQLite NuGet package is actually empty, but lists the following as dependencies...
So - I tried adding each one of these through the Package Manager Console and received the following error...
Install-Package : System.Data.SQLite.Core 1.0.98.1 is not compatible with UAP,Version=v10.0.
This seems like a fairly conclusive error message. So what do I do now... is SQLite actually supported for Windows 10 Universal Apps at the moment or not? Documentation I can find on the web seems pretty contradictory or at least seems to imply that I should be able to do what I'm trying to do.
Any help / pointers would be appreciated!
Upvotes: 2
Views: 9581
Reputation: 35
SQLite is supported for Universal Windows platform.
C# solution
C# or C++/CX solution
Project => References => Universal Windows => Extensions => SQLite for Universal Windows Platform
C++/CX solution
This SQLite-WinRT wrapper is handy for UWP apps written in C++/CX.
Upvotes: 0
Reputation: 374
Since the Windows 10 Anniversary Update (Build 14393), SQLite has also shipped as part of the Windows SDK
This link explains everything:
https://blogs.windows.com/buildingapps/2017/02/06/using-sqlite-databases-uwp-apps
Upvotes: 0
Reputation: 2710
Win10 UWP(UAP) and Win8.1/WP8.1 Store App does not support ADO. System.Data.SQL is an ADO provider, then it's not applicable for UWP, I believe.
To using SQLite on UWP, you need to have SQLite itself and wrapper for .NET.
SQLite - SQLite (Visual Studio Extension)
SQLite wrapper for .NET (NuGet) - SQLite.Net-PCL or SQLite.Net.Async-PCL
And, following link may helps you. It's a VB guy's blog =) but very insightful for uwp works.
Win10 apps in .NET - references
Edited 7 Feb 2017: Windows 10 Anniversary Update(1607) support the SQLite as "Microsoft.Data.SQLite".
Using SQLite databases in UWP apps - Windows blog
Upvotes: 3
Reputation: 70337
Looks like Microsoft is building a version. As of this comment, they are in release candidate 1.
https://github.com/aspnet/Microsoft.Data.Sqlite
Upvotes: 1
Reputation: 3271
go to http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki and download the right installer for the .net framework youre using.
this will register the dll's for you and give you everything you need
Upvotes: 0