7
votes

I'm running Visual Studio 2013 on Windows 8.1 Pro.

I am having an issue with debugging Windows Phone 8 apps. When I try and deploy to the virtual Phone (Emulator WVGA 512MB), I get the following:

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.

When I click yes, I get the following error:

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.'

After this I get the following error in Visual Studio:

Error 1 App deployment failed. Please try again. Line: 0 Column: 0

If I select No, it just sits on a screen with the following message:

The Windows Phone OS is starting...

I can run the emulator fine directly from Hyper-V, just not from Visual Studio.

I have tried a full repair of Visual Studio. Has anybody seen this? How do I solve this?

Thanks

2
Do you already have an active virtual switch connected to your WiFi adapter? One you're using with a different VM maybe? If so, I believe if you manually add that switch to the emulator in Hyper V it should fix the problem.Andrew Clear

2 Answers

2
votes

i usually delete the emulator vm and whatever virtual switches that was created with it, then restart the pc, after that i open Visual studio and i run my app, so that visual studio starts and creates the vm needed, then it works fine

You don't always need to restart i just do it just in case, deleting only the VM can help. just run your app through visual studio again.

2
votes

open hyper-v go to virtual switch manager and delete all the switchs

then open again your vs and run your project in the emulator , press yes when the configuration message appears

and wait ...

if doesn't work then go to the hyper-v and connect to your emulator and run your project again