Ionic 3 UWP on windows 10 throwing error related to MSBUILD


#1

Hi,

Im trying to create a sample UWP using ionic 3 on a window 10 machine. I have installed VS 2017. Also added MSBUILDDIR environmental variable. Currently Im stuck at the build step.

command used: ionic cordova build windows
Error:
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.exe” -version -nologo
Command finished with error code 0: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe -version,-nologo
Using MSBuild v15.8 from C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Building project: C:\Users\Test2\ionicapp\myApp\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: C:\WINDOWS\system32\reg.exe query “HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows” /s /v InstallationFolder /reg:32
Command finished with error code 0: C:\WINDOWS\system32\reg.exe 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:\Users\Test2\ionicapp\myApp\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.exe” C:\Users\Test2\ionicapp\myApp\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.exe C:\Users\Test2\ionicapp\myApp\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:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\lib\build.js:83:29
    at _rejected (C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:864:24)
    at C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:890:30
    at Promise.when (C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:1142:31)
    at Promise.promise.promiseDispatch (C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:808:41)
    at C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:624:44
    at runSingle (C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:137:13)
    at flush (C:\Users\Test2\ionicapp\myApp\platforms\windows\cordova\node_modules\q\q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:61:11)

Any help is appreciated.