2
votes

I'm facing a problem when I'm trying to test a Cordova App in my Windows Phone.

First, my configuration:

  • Windows 8 Enterprise 64
  • Visual Studio Enterprise 2015, logged in with my Microsoft account
  • Windows 8.1 SKD
  • Application developed with Cordova, Ionic Framework
  • Windows Phone 8 (Nokia Lumia 625)

I'm able to run the application in an emulator, but when I'm trying to debugging my application on my Windows Phone, I got this error:

Severity Code Description Project File Line Suppression State Error MSB6006 "MakeAppx.exe" exited with code 1. [C:\Projects\Tests\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\CordovaApp.Phone.jsproj] BlankCordovaApp6
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets 2439

I've setted the build output to detailed, and got this log:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2439,5): error MSB6006: "MakeAppx.exe" exited with code 1. [C:\Projetos\Testes\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\CordovaApp.Phone.jsproj] 1>MDAVSCLI : error : Error code 1 for command: C:\Program Files (x86)\MSBuild\14.0\bin\msbuild with args: C:\Projetos\Testes\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\CordovaApp.Phone.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=arm 1> Command finished with error code 2: cmd /s /c "C:\Projects\Tests\BlankCordovaApp6\BlankCordovaApp6\platforms\windows\cordova\build.bat --debug --archs=arm --phone --buildConfig=C:\Projects\Tests\BlankCordovaApp6\BlankCordovaApp6\build.json" 1>ERROR building one of the platforms : error : cmd: Command failed with exit code 2 1> You may not have the required environment or OS to build this project 1>MDAVSCLI : error : cmd: Command failed with exit code 2 1> Done executing task "MdaVsCli" -- FAILED.

After read this log, I reinstaled the SDK after noticed this line You may not have the required environment or OS to build this project, but no success

I've also tried to run with this command line, but same error:

cordova run --debug windows --device -- --phone --appx=8.1-phone

I've followed the steps here, but no success too: https://taco.visualstudio.com/en-us/docs/run-app-windows-phone/

Any help and suggestions are welcome. Thanks.

UPDATE: Following the @rido, I've tried to create a Windows Store App.

My VS2105 doesn't have this template, so I've installed. After created a empty Store App, Visual Studio asked to update my Microsoft Developer Licence.

Then, when I tried to build, I got an error noticing I was missing some platform requirements.

Looking for a solution, I followed the steps in this link: http://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/

After updated VS2015 Cordova, I was able to deploy for Android and Windows Phone but prior I had to register my Windows Phone for development, following this link: https://msdn.microsoft.com/pt-br/library/windows/apps/ff769508(v=vs.105).aspx

I hope these notes can help anyone else that has similar issues.

1
Can you confirm if your OS is Win8.0 or Win8.1? In case it's Win8.0.. can you try to create a Blank JS Windows Store app to see if your tooling works?rido
@rido, thank for your comment. My OS is Win 8.0, I'll try as you suggested and post the result.Ricardo Pontual
@rido, I got, please read the update. Thank you.Ricardo Pontual

1 Answers

0
votes

I followed the steps in this link, but no success: http://taco.visualstudio.com/en-us/docs/install-vs-tools-apache-cordova/

After updated VS2015 Cordova, I was able to deploy for Android and Windows Phone but prior I had to register my Windows Phone for development, following this link: https://msdn.microsoft.com/pt-br/library/windows/apps/ff769508(v=vs.105).aspx

Hope this can help anyone with similar issue.