Open Database fails on Windows 10 Release Build [Store -> Create app packages]
cspies opened this issue ยท 62 comments
Hello,
I am using this plugin in an Ionic 2 app.
The iOS and Android versions of the app have no issues whatsoever. The Windows 10 version gives me headaches:
When deploying to a device with a debug build, everything works fine. When switching to release mode, I get an error when trying to open the database ("Could not open database").
Any ideas what could be the cause of this?
In general use with Ionic is not covered by free support. I recommend that you start with https://github.com/litehelpers/Ionic-sqlite-database-example and try one thing at a time until you find out what does and does not work. In case you do find an isolated, reproducible issue with the plugin please report it for the benefit of others.
OK, so I started out with a plain cordova App in VisualStudio Community 2015.
Changed only two things from Standard:
Set Windows Version to 10.
Added sqlite plugin
The app is working debug/release up to the point where I want to create the store upload packages. Then I get a compilation error:
Error MSB3030 Datei "C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd" konnte nicht kopiert werden, da die Datei nicht gefunden wurde. [C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\CordovaApp.Windows10.jsproj]
Which basically says the file "...plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd" is not present.
There is a SQLite3.winmd file in the "arm" subfolder though, so I simply tried to copy it to the demanded location just to try it out. Its compiling, but I get the same error as described before with the ionic version. The database could not be opened.
Any suggestions?
There was a problem building the native SQLite3 library. Please show the entire output from the build log.
This is what I get in the output console:
1>------ Build started: Project: SQLiteTest2, Configuration: Release Windows-ARM ------
1> ------ Ensuring correct global installation of package from source package directory: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\packages\vs-tac
1> ------ Name from source package.json: vs-tac
1> ------ Version from source package.json: 1.0.42
1> ------ Package already installed globally at correct version.
1> ------ Cordova tools 6.1.1 already installed.
1> ------ Build Settings:
1> ------ Build Settings:
1> ------ platformConfigurationBldDir: C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\bld\Windows-ARM\Release
1> ------ platformConfigurationBinDir: C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\bin\Windows-ARM\Release
1> ------ buildCommand: build
1> ------ platform: Windows-ARM
1> ------ cordovaPlatform: windows
1> ------ configuration: Release
1> ------ cordovaConfiguration: Release
1> ------ projectName: SQLiteTest2
1> ------ projectSourceDir: C:\work\VisualStudio\SQLiteTest2\SQLiteTest2
1> ------ npmInstallDir: C:\Users\Christian.Spies\AppData\Roaming\npm
1> ------ buildTarget: Device
1> ------ language: en-US
1> ------ Platform windows already exists
1> ------ Copying native files from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\native\windows to platforms\windows
1> ------ Copied C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\native\windows\CordovaApp.pfx to platforms\windows\CordovaApp.pfx
1> ------ Copied C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\native\windows\Package.StoreAssociation.xml to platforms\windows\Package.StoreAssociation.xml
1> ------ Done copying native files to platforms\windows
1> ------ Updating plugins
1> ------ Currently installed plugins: cordova-plugin-whitelist@1.3.0,cordova-sqlite-storage@1.4.7,cordova-plugin-device@1.1.3,cordova-plugin-console@1.0.4,cordova-plugin-splashscreen@3.2.2,cordova-plugin-statusbar@2.1.3,ionic-plugin-keyboard@2.2.1,phonegap-plugin-barcodescanner@6.0.2,cordova-plugin-compat@1.0.0
1> ------ Currently installed dependent plugins:
1> ------ Currently configured plugins:
1> ------ Preparing platform: windows
1> Executing "before_prepare" hook for all plugins.
1> Executing "before_build" hook for all plugins.
1> Searching PlatformJson files for differences between project vs. platform installed plugins
1> No differences found between project and windows platform. Continuing...
1> Generating config.xml from defaults for platform "windows"
1> Found "merges" for windows platform. Copying over existing "www" files.
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square150x150Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square150x150Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square150x150Logo.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square150x150Logo.scale-240.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square30x30Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square30x30Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square310x310Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square310x310Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square44x44Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square44x44Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square44x44Logo.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square44x44Logo.scale-240.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square70x70Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square70x70Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square71x71Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square71x71Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Square71x71Logo.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Square71x71Logo.scale-240.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\StoreLogo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\StoreLogo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\StoreLogo.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\StoreLogo.scale-240.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Wide310x150Logo.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Wide310x150Logo.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\icons\windows\Wide310x150Logo.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\Wide310x150Logo.scale-240.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\screens\windows\SplashScreen.scale-100.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\SplashScreen.scale-100.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\screens\windows\SplashScreen.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\SplashScreenPhone.scale-240.png
1> Copying image from C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\res\screens\windows\SplashScreenPhone.scale-240.png to C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\images\SplashScreenPhone.scale-240.png
1> Updated project successfully
1> Executing "pre_package" hook for all plugins.
1> Executing "after_prepare" hook for all plugins.
1> ------ Copied C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\bin\Windows-ARM\Release\Microsoft.AppxPackage.Metadata.Overrides.props to platforms\windows\Microsoft.AppxPackage.Metadata.Overrides.props
1> ------ Building platform: windows
1> Release
1> ------ Build configuration options: --release
1> Executing "before_compile" hook for all plugins.
1> Resolving module name for shelljs => shelljs
1> Resolving module name for nopt => nopt
1> Reading build config file: C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\build.json
1> Searching for available MSBuild versions...
1> Found MSBuild v12.0 at C:\Program Files (x86)\MSBuild\12.0\bin\
1> Found MSBuild v14.0 at C:\Program Files (x86)\MSBuild\14.0\bin\
1> Found MSBuild v4.0 at C:\Windows\Microsoft.NET\Framework\v4.0.30319\
1> Building project: C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\CordovaApp.Windows10.jsproj
1> Configuration : release
1> Platform : arm
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(3963,5): error MSB3030: Datei "C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd" konnte nicht kopiert werden, da die Datei nicht gefunden wurde. [C:\work\VisualStudio\SQLiteTest2\SQLiteTest2\platforms\windows\CordovaApp.Windows10.jsproj]
1>MSBUILD : cordova-build error : Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
1>MDAVSCLI : error C: \Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Package: 0 succeeded, 1 failed ===========
For some reason your tool tries to copy SQLite3.winmd from a Debug directory even though you requested a release build. Unfortunately I cannot think of a decent explanation for this.
When selecting Store->Create App packages then some settings are put into the ".../platform/windows/CordovaApp.Windows10.jsproj" File. If the following entry is present, the build fails:
<PropertyGroup>
<BuildingInsideVisualStudio>True</BuildingInsideVisualStudio>
</PropertyGroup>
If removed, at least building the app works. But I just can't produce a working store upload package.
Hmm, I haven't seen this before. I think some others were able to publish to Windows store. You may want to try updating your copy of Visual Studio. If it still does not work you may want to try Stack Overflow or perhaps even the PhoneGap forum?
Visual Studio tools for Apache Cordova (TACO) should be able to support a Windows Store release build. TACO support for this plugin was announced in: http://taco.visualstudio.com/en-us/docs/release-update-10/
Is there a solution to this issue already?
I am facing the very same problem (using latest version of Visual Studio 2015 and version 1.4.8 of this plugin):
I am trying a release build for creating a app package for upload to the store and it fails with error message that the SQLite3.winmd could not be copied (by the way: Visual Studio also tries to copy it from the Debug directory although it is a release build: plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd)
However, I also searched the plugin directory for a "SQLite3.winmd" file and it does not exist anywhere inside of it.
An update because I was curious that the SQLite3.winmd did not exist at all:
I had removed and added the plugin before this build. So what happens ist that:
As cspies mentioned, trying to build an app package results in the above lines (True) being added to the CordovaApp.Windows10.jsproj
Once that happened, this plugin is not build any more during the build process (therefore the "SQLite3.winmd" was missing completly). Once I remove the lines from the CordovaApp.Windows10.jsproj, the projects build correctly again.
However, this bug prevents me from building an app store package. So, I hope anybody can fix this issue.
I didn't find any solutions and ended up removing this plugin alltogether. I'm now storing the data on the file system and use a caching mechanism to maintain access speed.
I have the same issue. I have no idea how all this plugin goes internally, but:
Log says it cant find \plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd
I checked this project code and there is no src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP
I dont know if it has something to do with this.
EDIT:
I think I have two possible causes, one is TFS and the second can be file permissions. Something is not right and not compiling the code the way it should be and fails somehow. But dont beleive me on this one.
EDIT 2:
TFS Output:
The item C:\Projects\Mobile\CordovaTests\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\arm\release\SQLite3.UWP.tlog\unsuccessfulbuild could not be found in your workspace, or you do not have permission to access it.
I checked this project code and there is no src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP
When you install this plugin on the windows
platform, src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\SQLite3.UWP.vcxproj
is added as a project reference. The Visual Studio Solution (.sln) file in platforms\windows
references SQLite3.UWP.vcxproj
as ..\..\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\SQLite3.UWP.vcxproj
.
I wonder if this relative path reference may cause a problem with building app packages inside Visual Studio?
If so, it may be possible to add another hook script to copy the SQLite3 project and Windows source files. I will probably need a couple months due to current backlog. I would like to get better support from the Cordova tooling in the future as well.
Also can you guys try this with Visual Studio tools for Apache Cordova (TACO)? TACO support for this plugin was announced in http://taco.visualstudio.com/en-us/docs/release-update-10/ and the TACO team may be able to support this case faster than I can.
I already have TACO Update 10.
I checked and paths are ok.
What is that winmd file for? is it just Sqllite compiled ? why not dll?
i opened the sqlite project and it compiles alright.
I still think its something about source control and paths. Got it working on My Documents.
But with TFS and Git fails... And just did exactly the same. And all running as admin.
@andreujuanc can you confirm:
Did you try building for the app store?
Do you see this issue with local builds for testing, only when building for the app store, or something else?
Are you able to build for the app store when you work within "My Documents"?
You reported results with TACO (Update 10). Did you try this outside TACO and if so, did you get the same results or not?
This issue is specifically about building for the app store. If you have trouble with something else then please open a new issue with a clear description. Also if "Team Foundation Server" causes problems then you may simply have to work within "My Documents" or perhaps some other local directory tree.
In addition I found an excellent description about WinMD files: http://www.codeproject.com/Articles/476957/WINMDplusFilesplusUnderplustheplusHood
@brodybits
Did you try building for the app store?
Yes
Do you see this issue with local builds for testing, only when building for the app store, or something else?
Not regular behaviour. At first everything was ok, testing with WP10 device , then I wanted to publish a private one for some mates to test some UI. And was then i got the issue, while creating the package.
Are you able to build for the app store when you work within "My Documents"?
Yes, but im still testing my theory.
Now i will do the following:
- New Empty solution (done)
- Add console project (just to commit something more). (done)
- Commit to TFS git project (done)
- Create blank cordova project (done)
- Build, deploy and create package. (done)
- a . Will change for Windows 10 (default is 8.1) and repeat 5. (done).
- b. Add misc plugins, like notifications, device, etc and repeat 5. (done)
- If 5 goes ok, then i will add this plugin and repeat number 5. (fail)
If fails, i will do the exact same without git or tfs.
EDIT:
Forgot => 5.a . Will change platform for Windows 10
Sounds ok?
PS: thanks for link.!
@andreujuanc your plan definitely looks good for me. Yes in general I think the Windows platform can be a big pain in case of native C++ libraries such as SQLite3. I start to wonder if it may be worth building SQLite3 separately and just using the binary libraries with the Windows JavaScript?
@brodybits That's probably going to help, since we are missing something in all the building projects inside projects. I think it got too complex to debug without getting your hands "dirty".
Right now i have this:
Inside a visualstudio.com with git repo: Blank Cordova Project, Asociated with Window Store. Cordova 6.1.1 (default for TACO):
Build, Deployed and package created.
Will continue process and update my list from above.
Build Failed. Same error.
Target Windows Phone (universal), Release, Windows 10.
I think i can see how can get this fixed. But I have a question. Since im new to the source of this project.
Where and when does the SqlLite3 project gets build?
Where are the output directory of those projects going to?
And most important question, Should the reference to the winmd be at platforms\windows\Debug\SQLite3.UWP\SQLite3.winmd ?
or inside src?
I just think that Sqlite3 project is not getting build at all.
I will try to figure out this, but if you can reply early it would be great.
OK,
- Manually build Sqlite3 , generated Dll and winmd files.
- Build cordova project, expected errors, find folder where libs were expected to be,
- copypasta.
- ?????
- Profit
I will find (hopefully) those bad references and paths that are broken and post it here so you can fix it. Or maybe i will clone, idk.
I see that build is done when installing the plugin for first time. And guess what? I deleted platform and plugin folder and now I dont have the issue anymore.
So problem could be when installing plugin? after having some other plugins installed, something gets in the way on the Windows10.jsproj or something and some env variable gets drunk so start pointing around to different folders.
I start to wonder if it may be worth building SQLite3 separately and just using the binary libraries with the Windows JavaScript?
Looks like something like that is the answer. There is some issue when installing the plugin. I have deleted twice now and gets build, dlls and winmd.
Win10 project is adding a reference to another project relative to it, just to get the path for the already compiled sources. Prob just better reference them directly.
Idk if you can close the issue, but i think its just this.
EDIT: It still does fail when creating packages, so, there are two related issues here. Not getting compiled when installed, so no reference to sqlite3 libs, and the second one is paths getting all potato when creating packages..
Build path on install:
plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\
Path referenced on creating package:
plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\arm\release\SQLite3.UWP
@andreujuanc thanks for the info. Do you mean that the automated build works when you create a Windows store package, and it also works with TFS/git?
Also do you mean that something breaks if you have other plugins installed? If so, this would be bad since people generally use multiple plugins with Cordova.
Do you mean that the automated build works when you create a Windows store package, and it also works with TFS/git?
Build is working ok. The issue is my last post.
Somehow some msbuild variable is getting mixed or something. Because it stops working and there is no way to fix it once is gets broken.
I have no idea what is causing the issue now. Im confused and its 2am xD
But i can tell you that im in release mode, targeting windows phone. And the Window10.jsproj project is looking into this folder: \Debug\SQLite3.UWP instead of: arm\release\SQLite3.UWP
Looked inside project definitions and no idea what it can be :(
Prob tomorrow ill try to get the issue but by now the workaround is just to copy . from:
plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\arm\release\SQLite3.UWP
to:
plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\Debug\SQLite3.UWP\
EDIT:
Also here when debug:
plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\arm\debug\SQLite3.UWP
Good night!
I do not work on this any more. @vladimir-kotikov to comment on this.
@brodybits, I started looking at this, will provide more details once I have a repro.
@vladimir-kotikov try with and without taco. Also with and without VS, just using Cordova CLI. Somehow plugin's sqlite project gets build in different folders.
Thanks guys!
I did some testing now and It didn't failed me. Even created a second project (in VS) next to the one that is "broken", and worked just fine. Tried changing windows build version, installing and uninstalling plugins, etc. and could not reproduce again.
One thing I didn't try was changing the Cordova version from 6.1.1 (vs default) to current installed and then back again. But will try today If I have time.
Cheers
Ok, it is consistently reproducing for me once I associate app with the Store (Store -> Create app packages
does the same under the hood). Once i've done this, all builds (in both debug and release configurations) fail with MSB3030: Could not copy the file "...\SQLite3.UWP\Debug\SQLite3.UWP\SQLite3.winmd"
and this also can be reproduced using Cordova CLI.
After looking at what's happening after Store association looks like it triggers some special magic in VS TACO that adds additional build properties to windows10.jsproj
, and in particular this one:
<PropertyGroup>
<BuildingInsideVisualStudio>True</BuildingInsideVisualStudio>
</PropertyGroup>
is the reason of the failure. At least if I manually remove this property, project successfully builds from Cordova CLI. However next build from VS restores this property and builds start failing again.
Unfortunately I have no idea right now why this property is being added and how it affects the build process, so right now I can't propose any solution or workaround. I will try to investigate further and let you know about results.
I should have read the thread from the beginning :) This is exactly the same observations as @cspies had provided.
Thanks @vladimir-kotikov for reproducing the issue. It would be great if you can give a pointer how to reproduce this issue from Cordova CLI. (Unfortunately I don't have VS TACO installed. Wondering if I could also reproduce this issue from the Visual Studio Community Edition [Update 3] that I have already installed.)
Then it would be nice to figure out where it goes wrong. I have no idea if this is a problem within Visual Studio, cordova-cli, cordova-windows scripts, this project, or perhaps any combination. I would be happiest to find a way to solve this in Cordova, this project, or both.
Unfortunately I don't have VS TACO installed. Wondering if I could also reproduce this issue from the Visual Studio Community Edition [Update 3] that I have already installed.
VS TAC is a component of VS 2015 so I guess you can add it easily to your VS instance, but I guess reproduce this using Cordova only is also possible - you only will need to add
<PropertyGroup>
<BuildingInsideVisualStudio>True</BuildingInsideVisualStudio>
</PropertyGroup>
to <YourApp>.windows10.jsproj
and then build the project with cordova build windows --release -- --appx uap --archs x86
This appeared to be an issue with VS tools. We're investigating it internally and will let you know about the results
Hi
This is just an fyi from developing with Ionic 2 apps.
I am also experiencing the same issue when building an app with the plugin. I'd get a missing SQLite3.UWP.vcxproj error on the console but it will still produce the .appx file.
C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1611,5): warning : The referenced project '....\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\SQLite3.UWP.vcxproj' does not exist. [C:\Users\user\projects\myapp\platforms\windows\CordovaApp.Windows10.jsproj]
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(4426,5): warning MSB3202: The project file "....\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\SQLite3.UWP.vcxproj" was not found. [C:\Users\user\projects\myapp\platforms\windows\CordovaApp.Windows10.jsproj]
However, this property does not exist in my myapp.windows10.jsproj
when building from either VS (Update 3, with cordova tools) or from cordova-cli, adding these lines will also not repro the error.
<PropertyGroup>
<BuildingInsideVisualStudio>True</BuildingInsideVisualStudio>
</PropertyGroup>
Hope this will be fixed soon.
@Perroquiet, this sounds like a different one. In your case referenced project is not found at all, however in the original report the vcxproj is not being compiled. I think you'd better to create a separate bug for your case.
@Perroquiet Have you created that separate issue? I have the same issue you have described. In my quick search it looks like the closest to this that I have found is this issue, which seems to describe exactly what I am seeing except for the fact that I am using Visual Studio 2015 instead of Visual Studio 2017 (#580). If I cannot find this issue I will create one.
To reproduce:
npm install -g ionic cordova
ionic start cutePuppyPics --v2
cd cutePuppyPics
ionic platform add windows
[add to the config.xml]
cordova plugin add cordova-sqlite-storage --save
ionic run windows [or if you want to specify a processor i.e.: ionic run windows --archs="x64"]
Then the following error appears:
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 of
Configuration and Platform for this project. Configuration='debug' Platform='x64'. You may be seeing this message bec
ause you are trying to build a project without a solution file, and have specified a non-default Configuration or Platfo
rm that doesn't exist for this project. [R:\dev\HarborWaterQuality\HarborWaterQuality.Ionic\plugins\cordova-sqlite-stora
ge\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\SQLite3.UWP.vcxproj]
Error: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe: Command failed with exit code 1
Edit: Sorry, this is not the same issue as you are encountering @Perroquiet. My issue seems to be a missing "OutputPath" property??
@vladimir-kotikov is this still an issue with the VS TAC/TACO tools? If so, will this be fixed in VS 2015 or should we wait for this to be fixed in VS 2017?
I'm not quite sure. I'll try to check if this has been resolved in latest VS TAC/VS 2017 RC tomorrow and let you know.
Thanks @vladimir-kotikov. Can you confirm the following:
- Is "VS TAC" part of VS 2015, VS 2017 RC, or both?
- Did you mean two different things by "VS TAC" and "VS 2017 RC"?
Is "VS TAC" part of VS 2015, VS 2017 RC, or both?
To clarify, Tools for Apache Cordova (VS TAC) is available for both VS 2015 and VS 2017 RC. The thing is that VS 2015 and VS 2017 RC ships with different versions of VS TAC (you can check the version of the extension under 'Help' -> 'About' in VS)
Did you mean two different things by "VS TAC" and "VS 2017 RC"?
In this particular case I mostly meant "VS TAC that comes with VS 2017" :)
I've just checked, and the bug still exist in latest 2017 RC, but hopefully it will have been fixed in final release. Unfortunately I don't have any information about whether the new version of VS TAC will be available for VS 2015, sorry :(
Thanks for the clarification. I will just document this as an issue until you confirm that this is fixed.
I have a solution but it's not the most elegant but I've successfully uploaded a working version of my app to the windows store using this plugin. The issue appears to be that everything is compiling right but visual studio is not correctly referencing the location of the sqlite compiled files. These instructions relate to the platforms (ARM, x86 and x64)
For x86 and x64 open the sqlite project file cordovaDirectory\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3SQLite3.sln
then select the x86 or x64 platforms in release configuration from the build menu in visual studio. Once built open the folder cordovaDirectory\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP
and copy the Release folder (this is the build output of the sqlite project) to your projects build directory cordovaDirectory\platforms\windows
then make a copy of that same folder and rename it to debug (there appears to be referencing issue here which is one you need the folder named debug as well as release but identical files in them both). So in the cordovaDirectory\platforms\windows
directory you should have two new folders Release and Debug which contain the folder SQLite3.UWP which has the .dll and .winmd files in them
Once you have done this you can create store packages for x86 or x64 configurations.
ARM is mostly the same but copy the ARM folder from cordovaDirectory\plugins\cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP
to cordovaDirectory\platforms\windows
delete the debug and release folders in that same directy then make a duplicate of the ARM folder and rename it to debug (so you should have the folders ARM and Debug in this directory instead of Debug and Release) then publish the release ARM version.
If you still get can't find file issues when building the project then it just means you haven't copied the compiled files into the correct directory in your project.
If the app compiles and runs but you get the SQL error 'Can't open Database' or similar it means that you're using the wrong platforms or release compiled files (i.e. using the ARM sqlite build files but trying to build your project for x86)
This is working with Cordova 6.3.1 installed globally, VS 2015 Version 12.0.25425.01 Update 3 and VS TAC Update 10, Windows 10 Build 14986. No reason why it shouldn't work with all windows configurations though as this appears to be an issue with the referenced project configurations and build process for this particular plugin.
I got the same issue. Do you have any idea how to resolve that?
And most important question, Should the reference to the winmd be at platforms\windows\Debug\SQLite3.UWP\SQLite3.winmd ?
or inside src
Severity Code Description Project File Line Suppression State
Error MSB3030 Could not copy the file "projectName\plugins\cordova-sqlite-storage\src\windows\SQLite3-WinRT\SQLite3\SQLite3.Windows\Debug\SQLite3.Windows\SQLite3.winmd" because it was not found. [projectName\platforms\windows\CordovaApp.Windows10.jsproj] projectName C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets 3963
@phuongwd try opening the CordovaApp.vs2013.sln solution file and running the UWP project from there
@davidstoneham thank you. Im tried. But we need to wait for a new update code.
@vladimir-kotikov is this fixed in the latest VS 2017 RC?
@brodybits, sorry, didn't have a chance to take a look today. Will try tomorrow and let you know
Just checked and unfortunately it isn't fixed yet. All VS updates since my last check (Dec 22th) don't contain any updates for Cordova tools (see https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes)
Guys, any idea?
I'm not sure if it is the same problem but when I opened my ionic app with SQlite plugin in visual studio 2015 CE it through an error
../../~/SQLite3.UWP.vcxproj could not be found.
So what I did to solve my problem is to add "System.Data.SQLite.DLL" to my project NuGet packages and project run on windows
@davidstoneham I followed what you suggested and the project built finally..... however it failed the
Binary analyzer
File SQLite3.UWP.dll has failed the SafeSEHCheck check.
File SQLite3.UWP.dll has failed the WXCheck check.
and Supported APIs with a bunch of errors.
Did yours pass or is there something else you needed to do? Everything works fine on the device at least...
@DigitalMystery if you followed the copying folders method then you'll run into the SafeSEHCheck and other errors when you check the pacakge.
If you open the solution file CordovaApp.vs2013.sln in the windows folder then you shouldn't need to do the copying of folders for the sqlite plugin and it willl pass the tests as well. the 2013 project file has all the references setup correctly but the 2015 project file isn't setup correctly so stick with CordovaApp.vs2013.sln and you shouldn't run into any issues
@davidstoneham thanks..... yea I ended up opening it with 2017, but then had to add the Linker option to the solutions properties found here if anybody else goes this route....
https://msdn.microsoft.com/en-us/library/9a89h429.aspx
If the link dies just search msdn for "/SAFESEH (Image has Safe Exception Handlers)"
I had the same problem. Here is what I do to pass the certification.
Package for each platform must be created one at a time.
For each platform :
-
Delete the content of cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP\ except SQLite3.UWP.vcxproj file.
-
Build the platform in Release
-
In cordova-sqlite-storage\src\windows\SQLite3-Win-RT\SQLite3\SQLite3.UWP, create a debug folder and copy the content of the generated release folder for the platform (ex: x64\release).
-
Create the package for the given platform (Projet\Store\Create app package menu).
-
Run Windows App Certification and it should pass.
@jclementdev solution works for me!! Great!!
Any update on this? I am seeing this issue in VS 2017...
After all something to do in VS 2017?