2
votes

I would like to use the SQLite-Net Extensions library in my winRT project. https://bitbucket.org/twincoders/sqlite-net-extensions

To support sqlite in my Windows 8.1 App I've currently installed SQLite for Windows Runtime (Windows 8.1) as VS Extension and sqlite-net via NuGet.

To get it working I tried to download the source and build it with the sqlite libs we can use for winRT. In order to add a reference to SQLite for Windows Runtime I need to change the target to Windows 8.1 only. Doing that will result in many errors like: "The name 'BindingsFlags' does not exist in the current context" "Instance argument: cannot convert from 'System.Type' to 'System.Reflection.MemberInfo'" I've also tried to link the SQLite-Net-PCL directly from my project but in the end it's the same situation.

I really need to add relationships to my sqlite database and would be very very thankful for every help I can get!

Attached you can find a screenshot of my VS2013 where I've changed the references of SQLiteNetExtensions to use the required winRT libraries.

Many many thanks in advance for any help you can give me!

enter image description here

1
If suggested answer helped you fix the problem please mark it as the answerMHOOS

1 Answers

2
votes

Following steps work for me without the need to download the source and possible compilation error:

(I have the following assumptions: I only target Windows 8.1 [As of yours] and I use Visual Studio Premium 2013 Update 3)

  1. In Visual Studio go to Tools-Extensions & updates-online section and look for sqlite. This package will contain required SQLite Binaries.
  2. Add a Reference to SQLite for Windows Run-time in your project Reference
  3. Add a Reference to Microsoft Visual C++ Run-time package
  4. In Nuget package manager console run "Install-package sqlite-net"
  5. In Nuget package manager console run "Install-Package SQLiteNetExtensions"

Now you will have a project which Targets Windows 8.1 and also has reference to both SQLiteNetExtensions. Above steps was originally recommended in : Using SQLite in a Windows Store App

Below is the screenshot of the SQLiteDemo project references downloaded from the link I mentioned earlier which also has reference to SQLiteNetExtensions :

enter image description here