NLOG, Log to SQLite on windows Phone 8

I have a Windows Phone application in wich I want to add NLog. The data from Nlog I want to put in a SQLite database.

If I'm doing this in a WindowsForm Application it is no problem, I just add NLog and System.Data.SQLite form the Nuget. But what to to on Windows phone 8?

I have installed Nlog all ready. (Downloaded it and add the reference manually) but how do I add System.Data.SQLite to the project? When I try installing it from Nuget I get the following error:

"Could not install package 'System.Data.SQLite.Core.MSIL 1.0.94.0'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."

Jens Borrisholt

Answers


I just recently wrote an article about how to use SQLite in Windows Phone 8 (mainly 8.1) but it should be the same. You can find this article here: http://www.brainchest.net/?p=1401

In short, what you have to do is the following:

  1. Download the SQLite for Windows Phone 8.1 extension by going to Tools –> Extensions and Updates –> Search for “SQLite for Windows Phone 8.1″ online and add a reference to your project (I guess you'd need "SQLite for Windows Phone" instead if you are targeting Windows Phone 8.0 and above).
  2. Via NuGet download the following packages into your project: SQLite.Net PCL, SQLite.Async.Net PCL, sqlite-net-wp8, SQLite.Net PCL - WindowsPhone8 Platform
  3. Set the platform target to either x86 or ARM, depending on where you deploy your project. For the emulator use x86, for the device use ARM. AnyCPU doesn't work because SQLite itself is native.

Need Your Help

Appcelerator Titanium Alloy: How to set the TableViewStyle to GROUPED in xml

titanium tableview appcelerator appcelerator-mobile

I've tried various things along the lines of (also tried just setting style to GROUPED):

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.