Windows 8.1, Windows 10 Emulators crashing in Visual Studio 2015

Problem:

windows-phone-emulator-error

a) I start Visual Studio and create/open Windows Universal Apps. Then I choose the appropriate Windows 8.1/Windows 10 emulator and start the debug.

b) The Emulator loads and shows “OS is starting” and keeps stuck there for long time. Then finally loads a popup giving this error:
“windows phone emulator is unable to connect to the windows phone operating system couldn’t set up the UDP port”

Seems pretty bad, right? Cursing the operating system guys? hmmmm.

Solution (will work no matter what):

a) Do not think about reinstalling stuff or repairing Visual Studio 2015/previous versions or reinstalling Hyper V, etc.

Try this OPTION I  first:

1.) Open Hyper-V

2.) Shutdown any existing configured Windows Phone emulators.

3.) Delete the existing Phone emulators you see in the list

3.) Click on “Virtual Switch Manager”

4.) Click on the “Windows Phone Emulator Internal Switch”

5.) Delete the existing “Windows Phone Emulator Internal Switch” by clicking “Remove”

6.) Click “Apply” and “OK”

This should work.

If this does not, then do this:

OPTION II:

1.) All steps in OPTION 1

2.) Now, open “Network Connections”

3.) You will see there “vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)”

4.) But hey, you deleted this same switch in OPTION 1, but still it shows in the Network Connections page.

This is the problem.

5.) Now open Device Manager

6.)  Expand “Network Adapters”

7.) You will see the names appearing under Network Adapter match the same as “Device Name” mentioned in “Network Connections” window (option II.2)

8.) Find out the correct “Hyper-V Virtual Ethernet Adapter” to be removed.
(Please note that on your computer the name could be “Hyper-V Virtual Ethernet Adapter #2” or “Hyper-V Virtual Ethernet Adapter #3” or anything that would match the “Device Name” of OPTION II.3)

9.) Now, in Device Manager, right click the correct Network Adapter and choose “Uninstall”.
This should disappear from the list.

10.) Open “Network Connections” and see that “vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)” will no longer be present there.

11.) Open Visual Studio, run the project in your desired emulator.

12.) This time everything will work fine and the Emulator will boot up Windows 10 or Windows 8.

Enjoy.

Love,
Angel Kaushish
(Microsoft Certified Solutions Developer)

One thought on “Windows 8.1, Windows 10 Emulators crashing in Visual Studio 2015

Leave a Reply

Your email address will not be published. Required fields are marked *