Error MSB6006 "MakeAppx.exe" Microsoft.AppXPackage.Targets debugging Visual Studio Cordova app on Windows Phone Device - visual-studio

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.

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.

Related

Visual Studio 2017 cannot send code to Mac using Taco Remotebuild

I know this question had been asked hundrets of times, but the solutions provided did not help me.
I now have installed Visual Studio Professional 2017 (previously Professional 2015), build 15.9.17 with Apache Cordova. I click on 'Release' --> 'iOS' --> 'Remote Device' in my project. In the platforms folder I deleted the previous ios folder beforehand.
On my Mac (High Sierra) I have installed Taco Remotebuild, created a Remotebuild.config with the following entries: "appLaunchStepTimeout": 600000, "emulatorLaunchTimeout": 600000. I also ran chmod 777 /Users/micha/.taco_home/remote-builds/taco-remote/builds.
Now I am starting remotebuild --secure false on my Mac and after a while I can see that my Visual Studio connects to the Mac. However after a while it says:
Severity Code Description Project File Line Column Suppression State
Error An error occurred uploading to the build server
http://192.168.178.35:3000/cordova/build/tasks?command=build&vcordova=6.3.1&cfg=release&options=--device:
Timeout for operation exceeded (translated from German "Timeout für
Vorgang überschritten") My-famous-program 6.0.1 1 1
Severity Code Description Project File Line Column Suppression State
Error An error occured connecting to the build machine: The build url
cannot be null. My-famous-program 6.0.1 1 1
Note: Both computers are connected using Wifi; a physical connection is not possible. On each computer Node.js with version 8.16.2 is running; a newer version is not possible due to other dependencies.
What do I have to do to have this running?
Thanks in advance!
Does the cordova folder get built on the MAC? I can connect and it sends over the project, but because Microsoft doesn't support cordova in VS you need to manually create a project on the MAC and then copy your www that was passed from VS to your newly created project. I found this works for me.
See this too: Visual Studio Taco - Remotebuild will no longer deploy to remote device

Giving error while running code for windows emulator WGA 512MB

I am trying out a trivial index.html file in the multi-device-hybrid-app in visual studio 2013. I could easily run it on android emulator. However, running on windows platform I ran into the following error.
cordova library for "wp8" already exists. No need to download. Continuing.
Generating config.xml from defaults for platform "wp8"
Calling plugman.prepare for platform "wp8"
Running command: C:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8\cordova\run.bat --nobuild --emulator
Deploying to emulator ...
ERROR: command failed in deploy.js : "C:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\bin\Debug\CordovaDeploy.exe" "C:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8" -d:1
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at System.Collections.Generic.List`1.get_Item(Int32 index)
at System.Collections.ObjectModel.Collection`1.get_Item(Int32 index)
at CordovaDeploy.DeployTool.GetDeviceAtIndex(Int32 index) in c:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\Program.cs:line 124
at CordovaDeploy.DeployTool.Main(String[] args) in c:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8\cordova\lib\CordovaDeploy\CordovaDeploy\Program.cs:line 208
Command finished with error code 2: C:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8\cordova\run.bat --nobuild,--emulator
The interesting thing is that it also creates a new solution in the
C:\temp\projects\BlankCordovaApp1\BlankCordovaApp1\bld\Debug\platforms\wp8
folder and if I open that solution, compile and run it, it just works fine on windows phone 8.1 emulator. Any ideas what I am doing wrong? I have set the paths correctly in visual studio 2013 I believe!
Looking into the error message it seems program failed to find any emulators at all for WP8. CPT2.0 used CordovaDeploy.exe to get the list of available WP8 emulators/devices which was buggy. It seems this issue was fixed in latest release of Visual Studio Tools for Apache Cordova -- CPT3.0. Follow the below steps to install CPT3.0
Uninstall Visual Studio Apache Cordova Multi-Device Hybrid App CPT2.0
Install Visual Update 4 from here
Install CPT 3.0 from here
Refer this for uninstall issue http://support.microsoft.com/kb/3014133

Error when attempting to run new blank hybrid app

I currently get the following error when attempting to run a hybrid app using the new cordova ctp for Visual Studio 2013.
Error 11 The command
""C:\Users\Nick\AppData\Roaming\npm\node_modules\vs-mda\vs-cli"
prepare --platform Android --configuration Debug --projectDir .
--projectName "BlankCordovaApp2"" exited with code 1. C:\Users\Nick\AppData\Roaming\npm\node_modules\vs-mda-targets\Microsoft.MDA.targets 115 5 BlankCordovaApp2
Do I need to install something else?
In certain cases, VS does not immediately detect the Android path after installation. Rebooting your machine is the only option for now.
for me I just deleted the bld folder and everything has become right

PhoneGap 3.3.0 WP8 project giving MSBuild error

I've decided to try PhoneGap and installed the Node package for it. (Phonegap 3.3.0)
Android projects work fine. But when I try to build a WP8 (or WP7) App I get this error:
An error occurred while building the wp7 project.ERROR: MSBuild failed
to create .xap when building cordova-wp7 for debugging.
I'm running Windows 8 Pro 64 bit, Visual Studio 2013 Ultimate, NodeJS & PhoneGap 3.3.0
A sidenote: WP8 Projects created with the Cordova Project Templates work perfectly fine.
It's the command line version that's giving me trouble.
I faced the same issue...
Perhaps it's an issue of the required files (for compilation) not being at the said path, since I could resolve it by running in the Visual Studio Command Prompt & compile successfully:

Error Build PhoneGap(Cordova-1.5) With Visual Studio 2010 - Error : The command "CScript" exited with code 9009

I need your help please.
I try to create a demo mobile application for windows phone 7 With PhoneGap ( Cordova-1.5)
I follow all the instruction that mention in the Get Started Guide at PhoneGap web site :
I install the windows phone sdk 7.1
I download phonegap zip file
I extract the zip file and copy the Cordova-1.5.0-Starter.zip file from the:
phonegap-phonegap-1.5.0-0-gde1960d\phonegap-phonegap-de1960d\lib\windows\Cordova-1.5.0-Starter.zip
To [USERNAME]\Documents\Visual Studio 2010\Templates\ProjectTemplates\Silverlight for Windows Phone
According the instructions.
When i build the project i get an error :
Error 1 The command "CScript "D:\DOT.NET\Demo
Applications\CordovaStarter2\CordovaStarter2/BuildManifestProcessor.js"
"D:\DOT.NET\Demo
Applications\CordovaStarter2\CordovaStarter2\CordovaStarter2.csproj""
exited with code
9009. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets 902 9 CordovaStarter2
I try to Uninstall windows phone sdk 7.1 & install it again and i dont understand what i miss ?
I really appreciate your help, please advice.
C:\windows\system32\cscript.exe "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"
works, it seems the build referenced wrong cscript.exe, so change it to
C:\windows\system32\cscript.exe could help
edit your project file and change this:
<PreBuildEvent>CScript "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
to
<PreBuildEvent>C:\windows\system32\cscript.exe "$(ProjectDir)/BuildManifestProcessor.js" "$(ProjectPath)"</PreBuildEvent>
I would say there's something wrong with at least one of your installations. I just pulled the same version of the Cordova starter template (from https://github.com/phonegap/phonegap/zipball/1.5.0), and followed all the steps which ran the starter project sucessfully.
I'd try re-installing everything. Visual Studio, Windows Phone SDK and download a fresh copy of the starter template.

Resources