none
[UWP][SDK]Problem with Windows 10 mobile emulator

    Question

  • When i try to test my app on a mobile windows 10 emulator the  emulator says: OS is starting and hyper v manager says emulator is running, but after a certain time the cpu usage of the emulator drops to 0% and then the emulator stops working and i dont even see the os: If i launch the emulator from the hyper-v-manager everything is ok, but i cant test my visual studio app with the hyper v emulator can I? After 5 minutes the emulator(running from visual studio 2015) gives me an error message: The emulator is "unable to connect to the device operating system: couldnt set up the udp port"

    How can i fix this problem any suggestions and do you need more information and if yes which kind of?

    Saturday, August 01, 2015 5:14 PM

Answers

  • Do you see your "Virtual Switch" information under: Control Panel\Network and Internet\Network Connections? If not, you can try to recreate your "Windows Phone Emulator Internal Switch" again from Hyper-V to see if that resolves your issue. Try these steps below:

    1.) Open Hyper-V

    2.) Shutdown any existing configured Phone emulators.

    3.) Click on "Virtual Switch Manager"

    4.) Click on the "Windows Phone Emulator Internal Switch"

    5.) Remember what the settings are displayed there (because you will delete it and recreate it)

    6.) Delete the existing "Windows Phone Emulator Internal Switch" by clicking "Remove"

    7.) Click "Apply" and "OK"

    8.) Re-create the "Windows Phone Emulator Internal Switch" by clicking the "New virtual network switch" and use the same settings you remembered in Step 5.

    9.) Then try to F5 from Visual Studio - which should configure a new emulator on the right virtual switch.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Saturday, August 01, 2015 7:10 PM
    Moderator
  • Just a note.  I seem to have worked around this one by making sure I was running VS 2015 as administrator.

    Right-click on the executable name either from your taskbar or the devenv.exe executable, and select "run as administrator". 

    Now having problems deploying to my device .  A few more net searches, and then a new post if that doesn't work!

    -thanks
    -e


    -- me --

    Saturday, August 29, 2015 6:23 PM

All replies

  • Do you see your "Virtual Switch" information under: Control Panel\Network and Internet\Network Connections? If not, you can try to recreate your "Windows Phone Emulator Internal Switch" again from Hyper-V to see if that resolves your issue. Try these steps below:

    1.) Open Hyper-V

    2.) Shutdown any existing configured Phone emulators.

    3.) Click on "Virtual Switch Manager"

    4.) Click on the "Windows Phone Emulator Internal Switch"

    5.) Remember what the settings are displayed there (because you will delete it and recreate it)

    6.) Delete the existing "Windows Phone Emulator Internal Switch" by clicking "Remove"

    7.) Click "Apply" and "OK"

    8.) Re-create the "Windows Phone Emulator Internal Switch" by clicking the "New virtual network switch" and use the same settings you remembered in Step 5.

    9.) Then try to F5 from Visual Studio - which should configure a new emulator on the right virtual switch.


    Windows Store Developer Solutions, follow us on Twitter: @WSDevSol|| Want more solutions? See our blog

    Saturday, August 01, 2015 7:10 PM
    Moderator
  • Just to show a more complete context of my problem (which I believe is the same one as above)

    Here, you can see the hyper-v window on the left, the emulator virtual machine running fine in the center, and the emulator still saying "OS is starting".

    One note: the very slow startup is evidently caused by the app addition script, but that finishes and the start screen displays on the virtual machine (as viewed in Hyper-V manager), but the emulator image seems to never get past "OS is starting..."

    thanks
    -e


    -- me --

    Saturday, August 29, 2015 5:36 PM
  • Just a note.  I seem to have worked around this one by making sure I was running VS 2015 as administrator.

    Right-click on the executable name either from your taskbar or the devenv.exe executable, and select "run as administrator". 

    Now having problems deploying to my device .  A few more net searches, and then a new post if that doesn't work!

    -thanks
    -e


    -- me --

    Saturday, August 29, 2015 6:23 PM
  • This is the same scenario I got. After a long wait, the emulator and the virtual machine will actually stop, and the application was not deployed from Visual Studio 2015.

    I tried to alter the network switch setting in Hyper-V but no help. Also tried to start Visual Studio in Administrator, still the same. Wondering may be need to try a clean install suggested in this post:

    https://social.msdn.microsoft.com/Forums/windowsapps/en-US/46af4b8c-78b7-452e-ae91-acee3bf0c65a/windows-10-mobile-emulator-not-starting?forum=wpdevelop

    I will try more to play around the network switch settings and report back later.

    Sunday, September 06, 2015 10:47 PM
  • Tried again and found the emulator is started after a very long wait for the emulator to start up. After started up the deployment was completed and debug from Visual Studio is actually working.


    Monday, September 07, 2015 9:09 PM
  • Worked for me - I'm starting vs now always as administrator.
    Friday, September 11, 2015 3:12 PM