This project is read-only.

Problems with the new version in a WP8 solution

Oct 15, 2013 at 9:45 AM
Edited Oct 15, 2013 at 10:29 AM
I tried to run your SqlitePhoneSample(http://blogs.msdn.com/b/andy_wigley/archive/2013/06/06/sqlite-winrt-database-programming-on-windows-phone-and-windows-8.aspx) 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 (http://sqlwinrt.codeplex.com/SourceControl/latest) 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 http://sqlwinrt.codeplex.com/SourceControl/latest 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 12:34 PM
Yes, for me last version (5/10/2013) works with WP8 ;-)
Oct 15, 2013 at 5: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 3.8.0.2) which demonstrates the new support for BLOB columns.

See http://andywigley.com/2013/10/07/sqlitewinrt-now-blob-columns-and-windows-8-1-supported/

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.

Andy

Oct 15, 2013 at 5: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 (http://sqlwinrt.codeplex.com/SourceControl/latest) so I suppose that the one in the SQLiteWinRTPhone directory could still have some problem...

Again thanks for your support
Enzo
Oct 18, 2013 at 10: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
Enzo