Windows Phone 8仿真程序从Hyper-V运行,但我无法从Visual Studio进行调试

时间:2013-10-21 20:40:31

标签: windows-phone-8 visual-studio-2013 windows-8.1

我在Windows 8.1专业版上运行Visual Studio 2013。

我在调试Windows Phone 8应用时遇到问题。当我尝试部署到虚拟电话(仿真器WVGA 512MB)时,我得到以下内容:

Do you want to configure the emulator to connect to the Internet? Your PC may lose its network connectivity while the changes are applied. This may affect any network operations in progress.

当我单击是时,我收到以下错误:

The Windows Phone Emulator wasn't able to create the external network switches. Something happened while creating a switch: Failed while creating virtual Ethernet switch. Ethernet port '{CD7D5F8C-C0EE-439E-8E0E-D139BC5E5A18} bind failed: The requested resource is in use. (0x800700AA). The virtual switch cannot be bound to the WiFi adapter because the network bridge is already in use. You can configure at most one virtual switch to be connected to a WiFi adapter.'

在此之后,我在Visual Studio中收到以下错误:

  

错误1应用部署失败。请再试一次。行:0列:0

如果我选择“否”,它只会位于屏幕上,并显示以下消息:

  

Windows Phone操作系统正在启动......

我可以直接从Hyper-V运行模拟器,而不是从Visual Studio运行。

我尝试过对Visual Studio进行全面修复。有人见过这个吗?我该如何解决这个问题?

由于

2 个答案:

答案 0 :(得分:2)

我通常删除模拟器vm和用它创建的任何虚拟开关,然后重新启动电脑,之后我打开Visual studio并运行我的应用程序,以便visual studio启动并创建所需的vm,然后它工作好的

您并不总是需要重新启动我只是为了以防万一,只删除虚拟机可以提供帮助。只需再次通过visual studio运行您的应用程序。

答案 1 :(得分:2)

打开hyper-v转到虚拟交换机管理器并删除所有交换机

然后再打开你的vs并在模拟器中运行你的项目,当出现配置信息时按是

等等......

如果不起作用,请转到hyper-v并连接到您的模拟器并再次运行项目