storesafe/cordova-sqlite-storage-help

Document why Windows AnyCPU target is not possible

brodybits opened this issue · 0 comments

In response to a side comment with a question concerning Windows AnyCPU (brodybits/cordova-sqlite-ext#9 (comment)):

It is not possible to build cordova-sqlite-storage, cordova-sqlite-ext, etc. on Windows platform with AnyCPU target since the sqlite plugin includes a C++ library build.

In addition Microsoft seems to be dropping support for AnyCPU target. As I said in apache/cordova-discuss#59:

Over the past 1-2 years I noticed that if I would use the Cordova CLI to add the Windows platform build and then open the Visual Studio Solution file with the Visual Studio (2015) GUI it would select the "Any CPU" platform by default. This was good for Windows 8.1 and Windows Phone 8.1 for WinJS apps without SQLite since almost other plugins have been JavaScript only. I found a nice article for reference that seems to be duplicated somehow:

Then I found out that Microsoft did not really want to support the "Any CPU" target platform for Windows 10 UWP. I discovered that if I would build a test app with no plugins I could run an "Any CPU" build in Debug mode but not release mode.

From an unrelated discussion (storesafe/cordova-sqlite-storage#610) I searched for information about an <EnableDotNetNativeCompatibleProfile> setting and found this question: http://stackoverflow.com/questions/29979047/windows-universal-app-no-any-cpu-configuration-for-windows-10

With some more searching I discovered why (.NET Native): https://blogs.windows.com/buildingapps/2015/08/20/net-native-what-it-means-for-universal-windows-platform-uwp-developers/

I wish this were documented more clearly for Cordova users, on a blog for example.