storesafe / cordova-sqlite-storage

A Cordova/PhoneGap plugin to open and use sqlite databases on Android, iOS and Windows with HTML5/Web SQL API
Other
2.15k stars 714 forks source link

Output path property not set in windows 10 project (SQLite3.UWP.vcxproj) when using sqllite on windows 10 using ionic 3 #913

Open hatimshaukat opened 4 years ago

hatimshaukat commented 4 years ago

I want to run sqlite on windows using ionic3 I have created a blank ionic 3 project and everything is working fine when I run the command ionic cordova build windows

After I add the sqlite plugins ionic-native/sqlite ionic-native/sqlite-porter

It is giving error

C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(724,5): error : The OutputPath property is not set for project 'SQLite3.UWP.vcxproj'. Please check to make sure that you have specified a valid combination o f Configuration and Platform for this project. Configuration='debug' Platform='Win32'. You may be seeing this messag e because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\CC\NativeApps\Sample-Windows\sample-windows\plugins\cordova-sqlite-st orage\src\windows\SQLite3-WinRT-sync\SQLite3\SQLite3.UWP.vcxproj] Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1 [ERROR] An error occurred while running subprocess cordova

Here is my package.json

{ "name": "samplewindows", "version": "0.0.1", "author": "Ionic Framework", "homepage": "http://ionicframework.com/", "private": true, "scripts": { "start": "ionic-app-scripts serve", "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint" }, "dependencies": { "@angular/animations": "5.2.11", "@angular/common": "5.2.11", "@angular/compiler": "5.2.11", "@angular/compiler-cli": "5.2.11", "@angular/core": "5.2.11", "@angular/forms": "5.2.11", "@angular/platform-browser": "5.2.11", "@angular/platform-browser-dynamic": "5.2.11", "@ionic-native/core": "4.20.0", "@ionic-native/splash-screen": "4.20.0", "@ionic-native/sqlite": "^5.20.0", "@ionic-native/sqlite-porter": "^5.20.0", "@ionic-native/status-bar": "4.20.0", "@ionic/storage": "2.2.0", "cordova-android": "6.3.0", "cordova-plugin-device": "^2.0.2", "cordova-plugin-ionic-keyboard": "^2.2.0", "cordova-plugin-ionic-webview": "^4.1.3", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-whitelist": "^1.3.3", "cordova-sqlite-storage": "^4.0.0", "cordova-windows": "5.0.0", "ionic-angular": "3.9.9", "ionicons": "3.0.0", "rxjs": "5.5.11", "sw-toolbox": "3.6.0", "uk.co.workingedge.cordova.plugin.sqliteporter": "^1.1.1", "zone.js": "0.8.29" }, "devDependencies": { "@ionic/app-scripts": "3.2.4", "typescript": "2.6.2" }, "description": "An Ionic project", "cordova": { "plugins": { "cordova-plugin-whitelist": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-sqlite-storage": {}, "uk.co.workingedge.cordova.plugin.sqliteporter": {} }, "platforms": [ "android", "windows" ] } }

brodycj commented 4 years ago

I do not support use of this plugin with cordova-sqlite-porter. I have also seen many, many issues with Cordova and Ionic, with and without this plugin. To get support, please post a minimal, reproducible example ([1]) as a Cordova project on GitHub with no plugins or platforms included.

[1] https://stackoverflow.com/help/minimal-reproducible-example

hatimshaukat commented 4 years ago

These are the default plugins which ionic uses in a blank application. This is a specific issue when using this plugin for windows 10 with ionic 3.

Here is how I created the sample application ionic start samplewindows blank --type=ionic-angular cd samplewindows

In the config.xml add this entry with the other preference tags <preference name="windows-target-version" value="10.0" /> ionic cordova build windows Everything works fine and the app is functioning

Now when I add these ionic cordova plugin add cordova-sqlite-storage npm install @ionic-native/sqlite

ionic cordova plugin add uk.co.workingedge.cordova.plugin.sqliteporter npm install @ionic-native/sqlite-porter

ionic cordova build windows

It gives the error mentioned in the question

hatimshaukat commented 4 years ago

I do not support use of this plugin with cordova-sqlite-porter. I have also seen many, many issues with Cordova and Ionic, with and without this plugin. To get support, please post a minimal, reproducible example ([1]) as a Cordova project on GitHub with no plugins or platforms included.

[1] https://stackoverflow.com/help/minimal-reproducible-example

Even if I only install this ionic cordova plugin add cordova-sqlite-storage npm install @ionic-native/sqlite

it gives the same error

brodycj commented 4 years ago

It looks to me like you are using Visual Studio 2015, while this plugin now requires Visual Studio 2017.

hatimshaukat commented 4 years ago

I have both Visual Studio 2015 and Visual Studio 2017 installed on my system. Is there a setting which I can use to point it to Visual Studio 2017? When I open the project in VS 2017 it does not compile however when I change the configuration from Debug | AnyCPU to Debug | x64 and same for Release then it compiles The problem is that the project requires some property the defines Output Path. The default value for it is Debug | AnyCPU which is not supported by the project.