Problems with the new version in a WP8 solution

Oct 15, 2013 at 8:45 AM
Edited Oct 15, 2013 at 9:29 AM
I tried to run your SqlitePhoneSample( because I'm evaluating to use this wrapper: however I have some problem!
Because the SQLite.WP80 is no more at the release 3.7.17 but at the release 3.8, compiling your example there is the following error:"The imported project "C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v8.0\ExtensionSDKs\SQLite.WP80\3.7.17\DesignTime\CommonConfiguration\Neutral\SQLite.WP80.props" was not found."
So I downloaded from the codeplex repository the latest version of the sqlite-winrt. Then I copied from tsqlwinrt_49f8079f900d\SQLiteWinRTPhone the script Update_Project_SQLite_SDK_References.ps1 into the directory 444.SqlitePhoneSample_195D42FB\SQLiteWinRTPhone of your example and I run it with powerShell. At this point the compilation was OK.
However I saw that the newest release from codeplex I downloaded ( is more recent from the one in the example (5/10/2013 instead of 24/5/2013) and it has also some more files (ex. NativeBuffer.h).
So I substituite all the SQLiteWinRTPhone directory of your example with the analogous of the last codeplex project. Then compiling I have the error:"Error 1 The type or namespace name 'SQLiteWinRTPhone' could not be found (are you missing a using directive or an assembly reference?) C:\Dati\projects\Local DB\sqlite-winrt\5444.SqlitePhoneSample_195D42FB\SqliteUsingSQLiteWinRT\ViewModels\TableViewModelBase.cs 14 52 SqliteUsingSQLiteWinRT."
I tried also to to delete the SQLiteWinRTPhone reference in the SqliteUsingSQLiteWinRT project and recreate the reference to the solution project SQLiteWinRTPhone.vcxproj. Nothing changed, same error.
So I tried to run the script Update_Project_SQLite_SDK_References.ps1 present in the SQLiteWinRTPhone folder. After that I have the following error: "C:\Dati\projects\CODEPLEX\sqlwinrt_49f8079f900d\SQLiteWinRTPhone\SQLiteWinRTPhone.vcxproj(167,3): The project file could not be loaded. '<', hexadecimal value 0x3C, is an invalid attribute character. Line 167, position 3."

At this point I wonder if the latest version of sqlite-winrt downloadable from is still working for WindowsPhone ... and if this wrapper will be supported also in the future for Windows Phone!

Please let me know as soon as you can because I need to make a decision on what kind of solution I have to use to access a local DB on my WP8 app.

Kind regards
Enzo Contini
Oct 15, 2013 at 11:34 AM
Yes, for me last version (5/10/2013) works with WP8 ;-)
Oct 15, 2013 at 4:10 PM

Thanks for your feedback.

There was a problem with the sample code on my blog. I have now updated the original post, so please go back and download once again! Thanks for reporting it.

And yes – apologies for the namespace change! In the latest version, I have standardized all three components (for WP8, W8 and W8.1) on the same namespace: SqliteWinRT. This is to make it a bit easier to share code. I have a new blog post explaining this change, and a new sample (targeting which demonstrates the new support for BLOB columns.


Lastly, the powershell script: that used to have an error in that it editied the project file, but then did not save it as ascii. That was corrected in the last update 5/10/2013 – see the last line of the script which should read:

$FileContents | Out-File $FilePath -Encoding ascii Force

Again, thanks for your feedback.


Oct 15, 2013 at 4:22 PM
Thank you Andy for your promp reply! Tomorrow I'll see the new example code from your blog.

Regarding the powershell script, I downloaded it today from codeplex ( so I suppose that the one in the SQLiteWinRTPhone directory could still have some problem...

Again thanks for your support
Oct 18, 2013 at 9:38 AM
Thank you Andy. The example from your blog works fine now, after your update.

However I think that the power shell script still have some problem. In fact, after I run the one inside the SQLiteWinRTPhone directory, for example in your example itself, the solution start to give the following error (even thought the last line of your script is $FileContents | Out-File $FilePath -Encoding ascii –Force):

C:\Dati\projects\Local DB\sqlite-winrt\SqlitePhoneSample\SqlitePhoneSample6\SQLiteWinRTPhone\SQLiteWinRTPhone.vcxproj : error : Unable to read the project file "SQLiteWinRTPhone.vcxproj".
C:\Dati\projects\Local DB\sqlite-winrt\SqlitePhoneSample\SqlitePhoneSample6\SQLiteWinRTPhone\SQLiteWinRTPhone.vcxproj(167,3): The project file could not be loaded. '<', hexadecimal value 0x3C, is an invalid attribute character. Line 167, position 3.

Let me know