Could not find SDK "SQLite.WinRT" - Add Reference shows "Missing value for TargetPlatformWinMDLocation property" - sqlite

I'm trying to create a Multi-device hybrid app that uses Typescript, WinJS, and a persistent local database. I've got it working to the point of rendering WinJS controls.
However, when I attempt to add WebSQL functionality according to the instructions for adding a Cordova plugin (go to config.xml file--> under plugins tab, check WebSQL Polyfill), it will no longer compile.
The compiler error is C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets(1886,5): error MSB3774: Could not find SDK "SQLite.WinRT, Version=3.8.2". [C:\Users\Lee\Documents\JSApps\TurnstileTS\TurnstileTS\bld\Debug\platforms\windows8\CordovaApp.jsproj]
I have all the latest versions of the SQLite binaries (both Win8 and Win8.1). I realize that the plugin seems to depend on v3.8.2, so I tried to add the NuGet package using the command line:
install-package SQLitePCL -Version 3.8.2
This installed successfully, but the next set of messages was:
Unable to find a reference to the extension SDK SQLite for Windows Runtime.
Verify that the reference to the extension SDK SQLite for Windows Runtime has already been removed.
Uninstalling 'SQLitePCL 3.8.2.0'.
Successfully uninstalled 'SQLitePCL 3.8.2.0'.
Install failed. Rolling back...
This is driving me crazy. I'm normally a C# person, so I realize this might be something simple... but I can't even add a reference to a dll like some other stackoverflow suggestions state. When I right-click on the project and try to "Add Reference..." I get the error message:
Missing value for TargetPlatformWinMDLocation property.
...then nothing.
Any ideas?
[edit] I have Win8, Win8.1, WP8, WP8.1 version of SQLite 3.8.6 installed. I just tried building a Windows Phone version of the app and it works! However, Windows 8 won't build. I set it to x86 instead of AnyCPU and it doesn't change anything.

There's a very simple fix to this. For Windows 8, you need to have the VSIX packages for SQLite already installed. Please, note which version number you have installed! As of 10/26/14, I have 3.8.7 installed.
From your solution's folder in explorer, navigate to:
{solution folder}\JavaScript\{project name}\bld\Debug\platforms\windows8
Edit the project's jsproj file in a text editor and scroll down until you see the entries for SQLite.
<ItemGroup>
<SDKReference Include="SQLite.WinRT, Version=3.8.7" />
</ItemGroup>
Change the version number in your file to the actual version on your computer. The project will build with the WebSQL plugin enabled and will actually work. (I verified the database file created in local storage.)
NOTE - You must already have enabled the WebSQL plugin in the config.xml menu.

Related

Error Running UWP Project (UniversalWindows)

I am making a crossplatform xamirin forms application that should run on android and pc windows.
During compiling the UWP version I get the exceptions:
Can not resolve Assembly or Windows Metadata file
'Xamarin.Forms.Platform.WP8.dll
and
Type universe can not resolve assembly: Xamarin.Forms.Platform.WP8,
Version = 1.5.0.0, Culture = neutral, PublicKeyToken = null
I read about these exceptions on the internet and from what I could see, it is related to the Xlabs plugin being used in the application. Is this information correct?
If yes, would I have some way to fix it without removing the Xlabs plugin, why am I using it on multiple forms to be able to checkboxes.
I faced this issues because of Nuget package was not up to date in my every project. I tried to fix this issues using below step.
Close the Visual Studio/Xamarin Studio.
Delete the Nuget package folder from root directory.
Delete the all bin, obj and debug folder from every project folder.
Right click on every project of Package folder and try to update.
Clean the all solution and Rebuild all.

how to add android.manifest in my cordova project

I have a problem installing ".apk" file that i generated to my device
I just discovered on StackOverflow that i have to set the version in android.manifest file of Cordova Project.
But i don't have any android.manifest!
how can add it?
where do i neet to put this file?
if yes where can i find a template to set all parameters?
I have visual studio 2015 with Cordova installed and in "add new
file" there is no android.manifest
I just discovered on StackOverflow that i have to set the version in android.manifest file of Cordova Project. But i don't have any android.manifest!
If you compile your project, you can find AndroidManifest.xml under Project Folder\platforms\android\AndroidManifest.xml. But it is not recommended modifying this file, because in cordova, in every compilation for android platform, this file will be overrided.
The recommended way is to double click config.xml file under your project folder and you will get something like below:
by "the Version" if you mean the SDK Version, then you should modify the Minimum/Maximum/Target API level.
If you mean the version of your app, then you should modify the value of Version Code.
After this, delete the app in your emulator/device, rebuild your project and run.

Error : while working with SQLite in windows phone 8

this is my first post. I get this error
The processor architecture of the project being built "Any CPU" is not
supported by the referenced SDK "SQLite.WP80, Version=3.8.10.2".
Please consider changing the targeted processor architecture of your
project (in Visual Studio this can be done through the Configuration
Manager) to one of the architectures supported by the SDK: "x86, ARM".
while working in windows phone app and using SQLite. If I set the architecture to ARM then it will disappear but I got another error of missing "community" from namespace in SQLite.cs file. Any one can help me out? Thanks in advance.
follow this:
Install Extension "SQLite for Windows Phone" from Tools -> Extension and Updates Menu. check screenshot 1
Then Install NuGet Pacakge sqlite-net-wp8 from NuGet Package manager. check screenshot 2
then add Conditional Compilation symbol USE_WP8_NATIVE_SQLITE in Project properties -> Build settings. check screenshot 3
Then Try to ReBuild the solutions and the errors will be gone..!
(I assumed that you've already copied those two files SQLite.cs and SQLiteAsync.cs)
Reference Links:
http://social.technet.microsoft.com/wiki/contents/articles/18204.how-to-use-sqlite-with-a-windows-phone-8-application.aspx
Type or namespace 'Sqlite' could not be found in SQLite.cs

New windows universal app with SQLite 3.8.7.4 doesn't work

I created a windows universal app (windows 8.1 and windows phone 8.1 winrt) working with SQLite 3.8.7.4.
But with SQLite, nothing works ! (The type or namespace name 'SQLite' could not be found)
YES I have included SQLite in my references :
YES I tried to clean my project and to build it again,
But I have no result. Does anyone have any idea?
I tried to update SQLite to 3.8.7.4 version on an existing app and it works, so, i continue to search why.
P.S : I'm using .NET 4.5
I found the difference between my 2 projects :
In my existing app, there are 2 files : SQlite.cs and SQLiteAsync.cs
But these files are not created on the 2nd project, that's why i can't find SQlite reference on my class.
These files are included by installing "sqlite-net" package from nugget.
In universal app if you add this 2 files : SQlite.cs and SQLiteAsync.cs in the "Shared project" then you will automatically get the reference of SQlite libraries in both project..
Refer the following link and follow the steps mention it'll help you
http://www.codeproject.com/Articles/826602/Using-SQLite-as-local-database-with-Universal-Apps
SQlite.cs and
SQLiteAsync.cs.
These two files are also missing from my project and when I try to install SQLite-net visual studio give me error that it is already installed. I spend a lot of time on finding why it is not adding these files to my project. If you are also suffering from same problem just uninstall it then reinstall it will start working.
:)

Type or namespace 'Sqlite' could not be found in SQLite.cs

I have a Windows Phone 8 app that utilizes SQLite. The app has many database functions, and includes a sqlite database file which, upon running the app, is copied to the local folder and accessed. All of this worked with no problem until I first switched to release build, upon which it did not work.
I "fixed" this by deleting all NuGet references and .dll references and started over following the steps here:A Workaround to Use SQLite in a Windows Phone 8 Application
I am having a frustrating problem where, after switching from debug to release build, or vice versa, 'Sqlite' is once again no longer recognized.
I get the following errors:
The type or namespace name 'Sqlite' could not be found (are you missing a using directive or an assembly reference?)
These errors are coming from SQLite.cs, specifically these lines:
using Sqlite3 = Sqlite.Sqlite3;
using Sqlite3DatabaseHandle = Sqlite.Database;
using Sqlite3Statement = Sqlite.Statement;
How is this possible? I saw some similar questions on here, but all of them simply said to delete and re-add the references and the problem inexplicably goes away. This is not working for me.
Follow this article to configure your project. Also explained here
Second you will need to go to the GITHUB website and download the
code for SQLite-net-wp8. This is a c++ project you will need to
access a sqlite database.
Make you sure you set Conditional compilation symbols: USE_WP8_NATIVE_SQLITE and release is x86 or ARM.
Tested on VS Profesional 2013, Release build (x86, ARM)
Go thorough bellow link
Windows Phone 7 Native Database Programming via Sqlite Client for Windows Phone
Hope it will help you

Resources