Windows Phone Emulator wasn’t able to connect to the Windows Phone operating system

I encountered some problems while trying to start a Windows Phone Emulator from within Visual Studio 2012. In a WP8 project, after starting a debugging session, during the emulator loading, one of the following errors raised:

The Windows Phone Emulator wasn’t able to connect to the Windows Phone operating system:
The emulator couldn’t determine the host IP address, which is used to communicate with the guest virtual machine.
Some functionality may be disabled.

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.

The WP8 app did not start, all I could see was the main tiled page of the emulated phone. Additionally, Visual Studio reported an error: “Invalid pointer“.

In order to solve this issue, follow this check list:

  1. Does your hardware support virtualization? Have you enabled it in BIOS?
  2. Are you running Windows 8 64-bit (x64) client version? It needs to be 64bit.
  3. Do you have any kind of other networking/virtualization software installed (VirtualBox, VPN software)? If you do, you might have to remove it to get the emulator work.
  4. Have you tried clearing the existing switches from Hyper-V manager and creating a new one? (run XdeCleanup.exe, is located in C:Program Files (x86)/Microsoft XDE/8.0)

Enjoy your work!

How to install Windows 8 Developer Preview

Download the Windows 8 Developer Preview from the follow link http://msdn.microsoft.com/en-us/windows/apps/br229516. Choose your version.

Download and install Oracle VirtualBox.

  1. Launch VirtualBox and create a New virtual machine (VM).
  2. Create a new VM with Windows 8 Developer Preview OS. Next
  3. Select at least half the RAM on your machine. Next
  4. Create a new Hard Drive. Next
  5. Select VDI (VirtualBox Disk Image). Next
  6. Select Dynamically Allocated. Next
  7. Set the position and the size (a minimum of 80GB is required) of the Virtual Drive. Next
  8. Create.
  9. A new empty Virtual Machine was created.

To install the relative OS load the .iso image on a virtual optical device in the guest machine.

  1. Open VirtualBox and launch the Virtual Machine created before
  2. Follow the procedure of the first start
  3. Choose the installation support (the virtual optical device where you loaded the .iso image
  4. Wait until the OS installation is finished

For developers:

After Windows 8 installation, launch the new OS and download Microsoft® Visual Studio® 11 Developer Preview (Web installer) from http://www.microsoft.com/download/en/details.aspx?id=27543