Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 Windows Phone Emulator not deploying

I am using VS 2013 express and i have a Windows Phone 8 simple app. When i start debugging the App using any Emulator it fails to deploy the XAP into the emulator. AFter 10 minutes an error message shows up "There were depoyment errors. Continue?"

This is the output while debugging the app:

Adding WMAppManifest.xml 1> Xap packaging completed successfully

Deploy started: Project: MyProject, Configuration: Debug Any CPU Deploying C:\Source\WidowsPhone8\MyProject.App\Bin\Debug\MyProject_Debug_AnyCPU.xap...

Connecting to Emulator 8.1 WVGA 4 inch 512MB...

The emulator starts but it is stuck in "Windows OS is Starting.."

Important: If i open the HyperV manager and manually start the Emulator. It works perfectly fine, i can use it without problem. The problem is when i try to launch it from visual studio.

I am using Symantec Endpoint protection as my antivirus. But i can't remove it, it is password protected. Could it be the antivirus blocking the "Deployment step"?.

like image 606
Herno Avatar asked Aug 20 '14 21:08

Herno


2 Answers

If you have Symantec Endpoint protection then do this steps:

  1. open SEP
  2. in Status -> Network Threat Protection select from Options Configure Firewall Rules.
  3. Click Add button
  4. Port and Protocols tab select from Protocols UDP
  5. Application tab browse to c:\program files (x86)\microsoft xde\8.1\xde.exe to allow the emulator
  6. click Ok

You need to repeat points 3 - 6 but more 2 times. Add Visual Studio c:\program files (x86)\microsoft visual studio [xxx]\common7\ide\devenv.exe Add Host Process c:\windows\system32\svchost.exe

  1. click Ok button to close Firewall Riles.
  2. Run your project. If the emulator not start to work restart your pc to be sure the rules is applied.

This allow on the emulator to get internet. I suppose the emulator not want to start because try to connect to internet but can't. In Control Panel\Network and Internet\Network Connections you have "vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)" When double click on it you need to see Received traffic. Then emulator will work. Of course if we assume you not have other problems with the system. This was solution for me.

like image 74
Saykor Avatar answered Oct 21 '22 05:10

Saykor


Open up Hyper-V manager and delete all the Emulator Virtual Machine. In your case Emulator 8.1 WVGA 4 inch 512MB. Then delete the all the virtual Switches created as well. Then re boot the system.

Run Visual Studio and the run the emulator from there. See if this works. If not, Try uninstalling and re installing VS 2013.

like image 26
Kasun Kodagoda Avatar answered Oct 21 '22 06:10

Kasun Kodagoda