Comments (10)
Please make sure you have the necessary workloads and products installed: https://cordova.apache.org/docs/en/dev/guide/platforms/windows/index.html#visual-studio-2017
from cordova-windows.
What version of Visual Studio 2017 are you using?
What values did you set the env vars to?
from cordova-windows.
system info
Ionic:
Ionic CLI : 5.0.1 (C:\laragon\bin\nodejs\node-v11\node_modules\ionic)
Ionic Framework : @ionic/angular 4.4.2
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : windows 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 4 other plugins)
Utility:
cordova-res : 0.3.0
native-run : 0.2.2
System:
Android SDK Tools : 26.1.1 (C:\Users\Theo\AppData\Local\Android\sdk)
NodeJS : v11.10.0 (C:\laragon\bin\nodejs\node-v11\node.exe)
npm : 6.7.0
OS : Windows 10
Project package.json
"dependencies": {
//....
"cordova-windows": "7.0.0",
//....
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"windows"
]
}
Environment
Hope it helps
from cordova-windows.
@janpio i just installed the sdk
here is the result:
ENV var VSINSTALLDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Community
Building project: C:\laragon\www\ionic\WinApp\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
Buildflags : /p:AppxBundle=Never
MSBuildTools : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
buildProject spawn: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild [ 'C:\\laragon\\www\\ionic\\WinApp\\platforms\\windows\\CordovaApp.Windows10.jsproj',
'/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
'/nologo',
'/p:Configuration=debug',
'/p:Platform=anycpu',
'/p:AppxBundle=Never' ] { stdio: 'inherit' }
prebuild.js: Patching platform `10`
- Injected `base.js` reference to `/www/index.html`
- Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
- Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
No valid MSBuild was detected for the selected target: AppPackages folder doesn't exist
from cordova-windows.
That's better.
"Universal Windows Platform development" Workload also selected?
If so try cordova run windows --archs=x86
.
Also try to build with --verbose
to see if you get additional output.
from cordova-windows.
"Universal Windows Platform development" Workload also selected?
Where should i select that?
from cordova-windows.
On the "Workloads" tab, see the screenshot on https://cordova.apache.org/docs/en/dev/guide/platforms/windows/index.html#visual-studio-2017
from cordova-windows.
@janpio yes i start to download it sorry for that anyway here is the result of --verbose
Prepared windows project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
getLatestMatchingMSBuild
getLatestMSBuild
ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Running command: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild -version -nologo
Command finished with error code 0: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild -version,-nologo
Using MSBuild v15.9 from C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Building project: C:\laragon\www\ionic\WinApp\platforms\windows\CordovaApp.Windows10.jsproj
Configuration : debug
Platform : anycpu
Buildflags : /p:AppxBundle=Never
MSBuildTools : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Running command: reg query HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows /s /v InstallationFolder /reg:32
Command finished with error code 0: reg query,HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows,/s,/v,InstallationFolder,/reg:32
buildProject spawn: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild [ 'C:\\laragon\\www\\ionic\\WinApp\\platforms\\windows\\CordovaApp.Windows10.jsproj',
'/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
'/nologo',
'/p:Configuration=debug',
'/p:Platform=anycpu',
'/p:AppxBundle=Never' ] { stdio: 'inherit' }
Running command: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild C:\laragon\www\ionic\WinApp\platforms\windows\CordovaApp.Windows10.jsproj /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo /p:Configuration=debug /p:Platform=anycpu /p:AppxBundle=Never
prebuild.js: Patching platform `10`
- Injected `base.js` reference to `/www/index.html`
- Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
- Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
Command finished with error code 0: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild C:\laragon\www\ionic\WinApp\platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=anycpu,/p:AppxBundle=Never
No valid MSBuild was detected for the selected target: AppPackages folder doesn't exist
CordovaError: No valid MSBuild was detected for the selected target: AppPackages folder doesn't exist
at C:\laragon\www\ionic\WinApp\platforms\windows\cordova\lib\build.js:83:29
at _rejected (C:\laragon\www\ionic\WinApp\node_modules\q\q.js:844:24)
at C:\laragon\www\ionic\WinApp\node_modules\q\q.js:870:30
at Promise.when (C:\laragon\www\ionic\WinApp\node_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\laragon\www\ionic\WinApp\node_modules\q\q.js:788:41)
at C:\laragon\www\ionic\WinApp\node_modules\q\q.js:604:44
at runSingle (C:\laragon\www\ionic\WinApp\node_modules\q\q.js:137:13)
at flush (C:\laragon\www\ionic\WinApp\node_modules\q\q.js:125:13)
at processTicksAndRejections (internal/process/next_tick.js:74:9)
from cordova-windows.
Thanks for the helps man it's working now after installing "Universal Windows Platform development"
Here I'd like to share process step by step for others in future.
- Install
VS17
(vs19 won't work) - Install
MSBuild
from VS17 Installation - Install
SDK 10
from VS17 Installation - Install
Universal Windows Platform development
from VS17 Installation - Install
cordova
globally - Install
cordova-windows
platform - Last but not least restart your system otherwise you still get the errors
Hope it helps to ease the process for others with the same issue.
from cordova-windows.
You can probably skip step 2 - the general MSBuild
should not be required and probably do more harm than good.
But great it now works for you β€οΈ
from cordova-windows.
Related Issues (20)
- JavaScript UWP development from VS 2019 not supported HOT 1
- JavaScript UWP development from Visual Studio 2019 not supported HOT 1
- Can't cordova build or run platform windows with Visual Studio 2017 HOT 3
- use @cordova/eslint-config HOT 1
- META: start major release 8.0.0 with some breaking changes HOT 1
- Can we use target minimum windows SDK version 10.0.16299.0 HOT 1
- Error: WebGL not supported HOT 2
- Windows: uap capability included when building for 8.1 HOT 1
- Using Chrome-based webview as rendering backend for Cordova for Windows instead of EdgeHTML HOT 2
- comma as decimal separator on ```<input type="number"> ``` HOT 1
- window.alert , prompt, confirm not working, please help me it is an emergency. Please please help me urgently.ππ»ππ»ππ»ππ» HOT 1
- The following navigation rule had an invalid URI scheme and will be ignored: "*". HOT 1
- Microsoft Surface hybrid touch events HOT 1
- Absolute (root relative) paths do not resolve to www folder, instead point to C:\... HOT 3
- Cordova installation problem HOT 2
- Running HelloWorld throws an error HOT 2
- package.windows10.appxmanifest does not set the correct descriptions as in config.xml HOT 1
- instructions from https://cordova.apache.org for platform Windows erroneous HOT 1
- The processor architecture of your project 'arm' doesnβt match the processor architecture 'x86' of the referenced project 'SQLite3.UWP'. HOT 1
- shelljs 0.5.3 is vulnerable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-windows.