Giving error while running code for windows emulator WGA 512MB - visual-studio-2013

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

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

Visual Studio Hangs After Cordova Run

My Visual Studio Enterprise Hangs after i build and run my Cordova Application. Take note that I have not done anything yet but create the app then run it.
I tried changing my CLI to: 5.3.3 but still gives the same problem.
My current CLI version is 6.1.2
Help

Windows 10 SDK won't install to Visual Studio

I've been trying to get Visual Studio and the Windows 10 SDK to work for over a week now. First I couldn't install Visual Studio. That problem was resolved by uninstalling EVERYTHING vaguely related to VS2015, thanks to manually going through everything, but also the Visual Studio "TotalUninstaller".
Plot twist: Now that I've managed to get VS2015 installed and running, I can't get the SDK to install. I've selected it with the installation process, tried to modify VS after, tried to install it with the Standalone installer, but none of it works. Every time, the installer doesn't notice anything wrong, all the tools appear in the start menu, a new "Program Files (x86)/WindowsKits/10.0" folder appears, with all the correct files, but VS can't open any UWP projects, can't create new any, and the SDK doesn't appear in the Extensions list.
When I uninstalled everything, there was only one thing I couldn't get rid of: "Windows 10 for Mobile Image - 10.0.10240.0". It just opens, runs for a second, and closes, achieving nothing in the process. As I couldn't get rid of this, I manually deleted any "Windows Kits" related folder in Program Files, Program Files (x86), ProgramData, and anything in the AppData folder. But this piece of fluffy garbage didn't leave my installed programs list. Could this have something to do with not being able to install the Windows 10 SDK correctly?
I looked in the install logs, and this is the only error I saw:
[371C:398C][2016-08-08T21:13:35]i301: Applying execute package: {7a68448b-9cf2-4049-bd73-5875f1aa7ba2}, action: Install, path: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe, arguments: '"C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe" -quiet -burn.related.patch -burn.ignoredependencies={248fcd1e-5ee1-421d-893f-ec0a94dd7b01} -burn.ancestors={248fcd1e-5ee1-421d-893f-ec0a94dd7b01}'
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to create embedded process atpath: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to run embedded bundle.
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to run bundle as embedded from path: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to execute EXE package.
[287C:137C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to configure per-machine EXE package.
It appears in every log when I try to install vs2015 with the right option ticked, or when I use the standalone installer. I've looked in C:\ProgramData\Package Cache and there is no {7a68448b-9cf2-4049-bd73-5875f1aa7ba2} folder, and none of the other folders contain "vsupdate_KB3022398.exe". It looks like this is the root of the problem.
EDIT: I've created the folder that was missing and added "vsupdate_KB3022398.exe" to it (found it online, hosted on a Microsoft server), and there are no more errors left. However, the problem still isn't fixed. The SDK simply refuses to show up. I think I'm going to have to do a clean install.
I had the issue of Windows 10 SDK 14393 failing to install on Windows 7 OS. This problem occurred when installing as part of Visual Studio 2015 and also running the Standalone Installer for the Windows 10 SDK 14393. According to the logs, the Windows Desktop Extension SDK failed to install.
As a work-around I installed Windows 10 SDK 10586 (Installed successfully)
Then I installed Windows 10 SDK 14393 (Installed successfully)
Both versions of the Windows 10 SDK appear as choices under Target Platform Version in Visual Studio 2015 for me.
Apparently the Windows 10 SDK 14393 installer is missing something which it requires to run successfully on Windows 7. (Something that must be present in the previous version)
Sorry for the difficulty. There are 2 known issues that are causing 'Fatal Error' in the Windows SDK install.
See the Windows SDK Tools Issues Forum.
You probably have (had) a pre-release of the SDK and one of the contracts installed is causing MDMerge to fail during setup. Uninstalling the prerelease version of the SDK should avoid this issue.
Thanks,
kevin
I had the MDMerge problem, after uninstalling all previous Windows 10 SDK toolkits, still couldn't install. Fixed it by moving the contents of: "C:\Program Files (x86)\Windows Kits\10", ran the installer again and it installed fine.
This is what I did and it kind of worked for me. Remove everything in the linker ( PROJECT -> LINKER -> Input -> Additional Dependencies, as can be seen in this screenshot

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

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.

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:

Resources