Windows Phone 8 emulator error - Something happened while creating a switch

Visual StudioWindows Phone-8

Visual Studio Problem Overview


I have a similar problem like mentioned in this question:

https://stackoverflow.com/questions/13148828/windows-phone-8-unable-to-create-the-virtual-machine

But, my problem is a bit different in the error description:

enter image description here

The Windows Phone Emulator wasn't able to create the virtual machine: Something happened while creating a switch: Xde couldn't find an IPv4 address for the host machine.

I have SLAT compatible hardware, virtualization is enabled in BIOS, my Windows 8 installation is 64bit and it's not virtualized. Hyper-V is installed (tried reinstalling it, but it didn't help). EDIT: VirtualBox or any other virtualization software (except for Hyper-V) is not installed

EDIT2: Seem to have been some other networking software which was installed. Having to remove it sucks big time because I need it professionally. I hope they fix it.

EDIT3: I wrote about it in more details with all I could find on my blog.

Visual Studio Solutions


Solution 1 - Visual Studio

It's already answered, but something easier worked for me (and without uninstalling VirtualBox):

"Go into Hyper V. Go into the Virtual Switch Manager. Create a virtual switch called 'Windows Phone Emulator Internal Switch'. Make it's connection type Internal. Now launch the emulator. It should work."

I had to reboot the machine before running the emulator, but now everything's working fine: VS2012, Xde and VirtualBox.

Credits go to TheGeekNextDoor.

Solution 2 - Visual Studio

Open the Hyper-V Manager from the start menu, and open the Virtual Switch Manager. Remove any existing switches, and try make a new virtual switch with a connection type set to internal.

You might need to run XdeCleanup.exe afterwards.

Solution 3 - Visual Studio

Had the same error message. After removing VirtualBox, everything works fine

Solution 4 - Visual Studio

For what it's worth, my problems have seem to go away after I turned off "Deterministic Network Enhancer" on all the vEthernet adapters like this:

network adapter settings

I got inspired to try this following the documentation online from Microsoft here. See the section titled "To reconfigure the Hyper-V virtual adapter used by the emulator".

Hope this one sticks. This has been a tiring process trying to keep up with what works and not with this "new and enhanced" emulator.

Solution 5 - Visual Studio

This worked for me. Go to Windows 8 start screen. Scroll right and see HyperV tile.

Go into Hyper V. Go into the Virtual Switch Manager. Create a virtual switch called "Windows Phone Emulator Internal Switch" Make it's connection type Internal.

Now launch the emulator. It should work.

Solution 6 - Visual Studio

Some of the answers here were helpful and by testing the trial-and-error method, I found solution that worked for me. Note: I have Cisco VPN client installed on Windows 8 64-bit. I did not want to remove Cisco client.

  1. Open Hyper-V Manager – Virtual Switch Manager and create virtual switch called “Windows Phone Emulator Internal Switch”. Make it’s connection type “Internal”. You don't have to remove any existing virtual switches.
  2. Open “Network Connections”. Right click “vEthernet Windows Phone Emulator Internal Switch” and select Properties. Deselect “Deterministic Network Enchancer” and click Ok. You could do that with other vEthernet interfaces as well.
  3. Run Emulator and it should work.

Solution 7 - Visual Studio

It seems that Xde is currently not compatible with Cisco VPN Client v5.x; with the VPN client installed, you indeed get this error. Uninstalling Cisco VPN Client resolves this.

Solution 8 - Visual Studio

This what helped me to solve the same issue: http://mobileworld.appamundi.com/blogs/petevickers/archive/2012/11/01/troubleshooting-windows-phone-8-emulator-problems.aspx

And no need to uninstall virtualbox even have it running at the same time

Hope this will help to someone

Solution 9 - Visual Studio

I have found the solution for this stupid error. I had working on this issue almost 1 month.

I just did 2 things recently and I emulator did create virtual machine in Hyper-V as well as deployed my application into Emulator.

  1. DISABLE ANTI-VIRUS. (I was using Panda Cloud Anti-Virus)
  2. Enable FIREWALL if you did TURN OFF

I hope this would work.

Thanks.

Solution 10 - Visual Studio

I had some issues getting this going. In the end, by randomly disabling and enabling my network adapters, I was able to get the virtual switch working even for an external adapter.

Solution 11 - Visual Studio

I was able to fix this by removing VMWare Player and Virtual Box, and then performing a Repair install of the Windows Phone 8 SDK (Control Panel-> Uninstall -> Windows Phone 8 SDK -> Change -> Repair

Solution 12 - Visual Studio

If this problem happens on Windows 10, there's an easy fix... navigate to:

  • Start Menu
  • Settings
  • Network and Internet
  • Status
  • Network Reset

This cleans up all of the virtual network adapters so they can be recreated by the emulator. Once you reboot, delete the emulator and then recreate it and it should create the necessary network adapters in such a way that it will work.

DISCLAIMER: This technique worked for me using Visual Studio Emulator for Android on a Windows 10 machine. I understand it's not Windows 8 and it's not a Windows Phone emulator, but the underlying issue is the same so if anyone lands here and has Windows 10, you may want to try this.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIgor RalicView Question on Stackoverflow
Solution 1 - Visual StudioAnderson PimentelView Answer on Stackoverflow
Solution 2 - Visual StudioClaus JørgensenView Answer on Stackoverflow
Solution 3 - Visual StudioViron PapadopoulosView Answer on Stackoverflow
Solution 4 - Visual StudioEric LiprandiView Answer on Stackoverflow
Solution 5 - Visual StudiocoderproView Answer on Stackoverflow
Solution 6 - Visual StudiodotokijaView Answer on Stackoverflow
Solution 7 - Visual StudioMarc GravellView Answer on Stackoverflow
Solution 8 - Visual StudioFelixView Answer on Stackoverflow
Solution 9 - Visual StudiowebwizoView Answer on Stackoverflow
Solution 10 - Visual StudioVeeTheSecondView Answer on Stackoverflow
Solution 11 - Visual StudiozshiftView Answer on Stackoverflow
Solution 12 - Visual StudioAaronKView Answer on Stackoverflow