Unable to Launch Windows Phone Emulator

2019-02-02 05:33发布

I am trying to run unit tests on our CI server. When i run the following command it tries to launch emulator but fails with the following message

vstest.console.exe myxapfile.xap

Error Message

The Windows Phone Emulator wasn't able to ensure the virtual machine was running:

Something happened while starting a virtual machine: 'Emulator WVGA 512MB.ttmaltiparmak' failed to start. (Virtual machine ID 1350ADCE-CC35-4615-BFD5-250179F789EE)

The Virtual Machine Management Service failed to start the virtual machine 'Emulator WVGA
512MB.ttmaltiparmak' because one of the Hyper-V components is not running (Virtual machine ID
1350ADCE-CC35-4615-BFD5-250179F789EE).

My system seems to support following requirements (But it is a virtual machine is it a problem?)

  • 64 bit windows 8
  • SLAT Support
  • 4 GB ram
  • Hyper-V is on

Further trials and results:

I tried removing and re-adding hyper-v through add-remove programs and now Hyper-V Platform option is disabled and i can not activate it :S Gilson Banin says that hyper-v installation is not possible on virtual machines, as i mentioned before our server is a virtual machine is it right that i cant use hyper-v on a virtual machine?

http://blogs.technet.com/b/gbanin/archive/2013/06/26/how-to-install-hyper-v-on-a-virtual-machine-in-hyper-v.aspx

enter image description here

The answer given on MSDN: http://social.msdn.microsoft.com/Forums/wpapps/en-US/083c8964-071f-469a-8740-2412a69092fc/unable-to-launch-windows-phone-emulator?forum=wptools

11条回答
做自己的国王
2楼-- · 2019-02-02 05:39

I had a situation where I had installed an azure component which preceded the current Visual Studio quarterly update and caused the emulator to die.

I recommend that you re-install/fix the current Visual Studio Update. Reboot and try again.

查看更多
仙女界的扛把子
3楼-- · 2019-02-02 05:40

Right Click on Computer --> Click Properties --> On Left Look for "Advanced System Properties" and Click on it Click "Advanced" tab --> Click the "Performance Setting" Button --> Click "Advanced" Tab --> In the "Virtual Memory" section Click "Change .." --> Unchecked Automatically manage paging file size for all drives --> Click Radio Custom size --> Set the values manually - Minimum [4096], Maximum [8192]

查看更多
该账号已被封号
4楼-- · 2019-02-02 05:41

You have not installed Hyper-V properly. "Hyper-V platform" should be installed for the service to run. Normally VM's have a "hypervisor" running by default and Hyper-V requires this hypervisor to run itself.

So first disable the hypervisor of the VM by altering the "vmx"(in case its vmware) file of your virtual machine(BACK UP THE FILE BEFORE MAKING CHANGES!)

off your VM

locate the .vmx file

If you cant fiond the vmx file read this article - http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003880

open it with notepad and add this line at the end(or anywhere actually)

hypervisor.cpuid.v0 = "FALSE"

If you cant find the vmx file read this article http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003880

Now you will be able to install the "Hyper-V platform" in windows "turn windows features on or off", do that.

restart

Try deploying to WP Now! If it is still not working please comment the error you get!

查看更多
你好瞎i
5楼-- · 2019-02-02 05:44

Make sure you select the option “Virtualize Intel VT-x/EPT or ARM-V/RVI”. This is required to be able to run HYPER-V on your virtual machine.

查看更多
孤傲高冷的网名
6楼-- · 2019-02-02 05:45

Ok, I've successfully fixed this issue. But I've my particular scenario, so I don't know if it can solve for you too. My scenario is as follow:

  1. I'm developing for Windows Phone 8, using a iMac 10.9.1 OSX;
  2. I'm using the VMWare Fusion 6, with Windows 8.1 imported through bootcamp;
  3. I'm using Visual Studio 2013 Ultimate, running the emulator from it;
  4. I was receiving that error in every manner that I used to launch the Windows Phone Emulator.

To fix the issue:

  1. You must use Hyper-V (VM Settings -> Processors & Memory -> Advanced options -> [Enable hypervisor applications in this virtual machine] must be checked), only changeable with VMWare turned off;
  2. To use Hyper-V, your VMWare must have at least 2 processors. It can be set with VMWare turned off in the same window of item 1;
  3. In VM Settings -> Advanced -> Preferred virtualization engine, select Intel VT-x with EPT;
  4. Open the directory where you VMWare image is located, and open it with [option] button holded. Click in [Show Package Contents] and locate the .vmx file. Open this file with a text editor and put/modify these lines:
    • hypervisor.cpuid.v0 = "FALSE"
    • mce.enable = "TRUE"
    • vhv.enable = "TRUE"
  5. I've followed these references:

I hope that it helps you too!

查看更多
家丑人穷心不美
7楼-- · 2019-02-02 05:47

Just open Hyper-V manager and delete all connections. Then try again. This solution worked on my PC.

查看更多
登录 后发表回答