Visual studio (2015) emulator for android not working - XDE.exe - Exit Code 3

Usually, the System.ServiceModel.ServiceHost error means there is some residue from a botched installation.

First, go to Task Manager and kill any running XDE processes. If that doesn't fix it, go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair"


I have found the following to work for me:

  1. Disable your WiFi connection.
  2. Launch your app.
  3. Observe Emulator gets loaded
  4. Re-enable WiFi.
  5. Note how restarting your app should not be an issue anymore as long as the emulator is initially loaded.

After hours and hours of research, and applying following steps I finally get it working:

1) Repair Android SDK - go to Programs and Features > Microsoft Visual Studio Emulator for Android > Change and hit "Repair"

2) Remove All Hyper-V virtual switches - go to Hyper-V > Virtual switch manager > Remove all virtual switches

3) Run XdeCleanup.exe - In my case: "C:\Program Files (x86)\Microsoft XDE\10.0.10240.0"

4) In my case I had configured Internet connection sharing on Ethernet adapter before so I had to disable it


I ran into the same problem. However, I have managed to get the emulator running by doing the following. Browse to the xde.exe directory and open a command prompt then run xde.exe with the xde arguments in your log minus the /nostart /silent commands. So in your case:

xde.exe /sku Android /displayName "VS Emulator 5\" KitKat (4.4) XXHDPI Phone" /memSize 2048 /diagonalSize 5 /video "1080x1920" /vhd "C:\Users\lacike\AppData\Local\Microsoft\VisualStudioEmulator\Android\Containers\Local\Devices\vhd\5_KitKat_(4.4)_XXHDPI_Phone\image.vhd" /name "VS Emulator 5-inch KitKat (4.4) XXHDPI Phone.lacike"

It's probably also worth opening task manager first and end all running xde.exe processes first.

However I don't have Xamarin, so I'm not able to confirm that this will then let you deploy to the emulator.