C# 无法启动 Windows Phone 模拟器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19271073/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unable to Launch Windows Phone Emulator
提问by mehmet6parmak
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
我正在尝试在我们的 CI 服务器上运行单元测试。当我运行以下命令时,它尝试启动模拟器但失败并显示以下消息
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
- 64 位 Windows 8
- SLAT 支持
- 4 GB 内存
- Hyper-V 已开启
Further trials and results:
进一步的试验和结果:
I tried removing and re-adding hyper-v through add-remove programs and now Hyper-V Platformoption 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?
我尝试通过添加删除程序删除和重新添加 hyper-v,现在Hyper-V 平台选项被禁用,我无法激活它:S Gilson Banin 说在虚拟机上无法安装 hyper-v,正如我提到的在我们的服务器是虚拟机之前,我不能在虚拟机上使用 hyper-v 对吗?
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
MSDN 上给出的答案:http: //social.msdn.microsoft.com/Forums/wpapps/en-US/083c8964-071f-469a-8740-2412a69092fc/unable-to-launch-windows-phone-emulator? forum =工具
回答by Mehdi Bugnard
Select the Emulator VM you are going to use in Windows 8 Phone development (default one is “Emulator WVGA 512MB”). Go to the Hyper-V VM settingsand change the number of processorsfrom 2 to 1. Press Apply and than OK in order to apply new settings.
选择您将在 Windows 8 Phone 开发中使用的 Emulator VM(默认为“Emulator WVGA 512MB”)。转到Hyper-V VM 设置并将处理器数量从2更改为 1。按 Apply 然后按 OK 以应用新设置。
If on a Mac or virtual machine ..
如果在 Mac 或虚拟机上..
Or try to see the other solutions in this link:
或者尝试在此链接中查看其他解决方案:
Running Windows 8 Phone emulator in the Windows 8 virtual machine Problem
在 Windows 8 虚拟机中运行 Windows 8 Phone 模拟器问题
I really hope this link link can help you a less ;-)
我真的希望这个链接可以帮助你少一些 ;-)
回答by Logu
Just copy your vhd and other files from the vhd location to another folder. Just create another a new VM with the VHD which you just copied. Now it will start.
只需将您的 vhd 和其他文件从 vhd 位置复制到另一个文件夹。只需使用刚刚复制的 VHD 创建另一个新 VM。现在它将开始。
回答by ΩmegaMan
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.
我遇到过一种情况,我在当前 Visual Studio 季度更新之前安装了一个 azure 组件并导致模拟器死机。
I recommend that you re-install/fix the current Visual Studio Update. Reboot and try again.
我建议您重新安装/修复当前的 Visual Studio 更新。重新启动并重试。
回答by MMI
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.
确保选择“Virtualize Intel VT-x/EPT or ARM-V/RVI”选项。这是能够在您的虚拟机上运行 HYPER-V 所必需的。
回答by Ile Zee
Just open Hyper-V manager and delete all connections. Then try again. This solution worked on my PC.
只需打开 Hyper-V 管理器并删除所有连接。然后再试一次。此解决方案适用于我的 PC。
回答by Tommy Ovesen
I had the same problem. This fixed it.
我有同样的问题。这修复了它。
Shut down the VM, select option “Virtualize Intel VT-x/EPT or ARM-V/RVI” in the vm processor settings.
关闭虚拟机,在虚拟机处理器设置中选择“Virtualize Intel VT-x/EPT or ARM-V/RVI”选项。
Then add these two lines to the end of the vmx-file:
然后将这两行添加到 vmx 文件的末尾:
hypervisor.cpuid.v0 = "FALSE"
mce.enable = "TRUE"
Start the VM, add the Hyper-V components and restart the vm. Next time you start the emulator, Visual Studio will configure Hyper-V and run the emulator
启动虚拟机,添加 Hyper-V 组件并重新启动虚拟机。下次启动模拟器时,Visual Studio 将配置 Hyper-V 并运行模拟器
回答by user3174624
Add these two lines to the end of the vmx-file:
将这两行添加到 vmx 文件的末尾:
hypervisor.cpuid.v0 = "FALSE" mce.enable = "TRUE"
hypervisor.cpuid.v0 = "假" mce.enable = "真"
回答by Marcelo
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:
好的,我已经成功解决了这个问题。但是我有我的特殊情况,所以我不知道它是否也可以为您解决。我的场景如下:
- I'm developing for Windows Phone 8, using a iMac 10.9.1 OSX;
- I'm using the VMWare Fusion 6, with Windows 8.1 imported through bootcamp;
- I'm using Visual Studio 2013 Ultimate, running the emulator from it;
- I was receiving that error in every manner that I used to launch the Windows Phone Emulator.
- 我正在为 Windows Phone 8 开发,使用 iMac 10.9.1 OSX;
- 我正在使用 VMWare Fusion 6,并通过 bootcamp 导入 Windows 8.1;
- 我正在使用 Visual Studio 2013 Ultimate,从中运行模拟器;
- 我在用于启动 Windows Phone 模拟器的各种方式中都收到了该错误。
To fix the issue:
要解决此问题:
- 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;
- 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;
- In VM Settings -> Advanced -> Preferred virtualization engine, select Intel VT-x with EPT;
- 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"
- I've followed these references:
- 您必须使用 Hyper-V(VM 设置 -> 处理器和内存 -> 高级选项 -> [在此虚拟机中启用管理程序应用程序] 必须被选中),只能在关闭 VMWare 的情况下更改;
- 要使用 Hyper-V,您的 VMWare 必须至少有 2 个处理器。可以在第 1 项的同一个窗口中关闭 VMWare 进行设置;
- 在VM设置->高级->首选虚拟化引擎中,选择Intel VT-x with EPT;
- 打开 VMWare 镜像所在的目录,然后按住 [option] 按钮打开它。单击 [Show Package Contents] 并找到 .vmx 文件。使用文本编辑器打开此文件并放置/修改以下行:
hypervisor.cpuid.v0 = "FALSE"
mce.enable = "TRUE"
vhv.enable = "TRUE"
- 我遵循了这些参考资料:
I hope that it helps you too!
我希望它也能帮助你!
回答by Ricardo Rodrigues
After enabling support for VTx in your BIOS, you might want to check your system by running the Codeinfotool.
在您的 BIOS 中启用对 VTx 的支持后,您可能希望通过运行Codeinfo工具来检查您的系统。
Also, don't forget to enable "Hyper-V Management Tools" and "Hyper-V Platform" on "Control Panel->Programs and Features->Turn Windows Features on of off->Hyper-V":
另外,不要忘记在“控制面板->程序和功能->关闭Windows功能->Hyper-V”上启用“Hyper-V管理工具”和“Hyper-V平台”:
I am running Windows 8 64 bit inside VMware player on top of a windows 7 machine. Also had problems running the emulator from windows phone 8, and solved them by following this guide: http://developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator
我在 Windows 7 机器上的 VMware 播放器中运行 Windows 8 64 位。从 windows phone 8 运行模拟器也有问题,并按照本指南解决了这些问题:http: //developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator
Hope it helps...
希望能帮助到你...
回答by Ricardo Rodrigues
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]
右键单击计算机--> 单击属性--> 在左侧查找“高级系统属性”并单击它单击“高级”选项卡 --> 单击“性能设置”按钮 --> 单击“高级”选项卡> 在“虚拟内存”部分单击“更改..” -->取消选中自动管理所有驱动器的分页文件大小--> 单击无线电自定义大小--> 手动设置值 -最小 [4096],最大 [8192]