Visual Studio 2013 Windows Phone Emulator not depl

2019-02-13 10:35发布

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"?.

5条回答
仙女界的扛把子
2楼-- · 2019-02-13 10:59

I uninstalled the SEP and the emulator started working just fine. It seems to be that SEP firewall settings blocks the communication from Visual Studio to Hyper-V machines.

查看更多
3楼-- · 2019-02-13 11:09

Some client side firewalls may interfere with Visual Studio's ability to correctly launch the emulator. See
the windows phone emulator wasn't able to connect to the windows phone operating system
where various users disabled their firewalls to solve similar problems and
http://social.msdn.microsoft.com/Forums/en-US/d12d3d34-0a6c-4e17-9b5b-4c2f89f94d22/firewall-rule-to-allow-connection-to-windows-phone-emulator?forum=wptools
where Chetan Savade and Curtis Trobaugh suggest adding Symantec Endpoint Protection rules to open up UDP traffic.

If you can get your administrator to open up the correct UDP Ports on your Development Box, this problem may go away.

查看更多
虎瘦雄心在
4楼-- · 2019-02-13 11:11

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.

查看更多
不美不萌又怎样
5楼-- · 2019-02-13 11:13

Go to firewall and click:

  1. Allow app or feature through windows firewall
  2. Click change setting
  3. Un-check Hyper-v and Hyper-V Management Clients

Then run the emulator.

查看更多
Rolldiameter
6楼-- · 2019-02-13 11:18

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.

查看更多
登录 后发表回答