January 18, 2018

Develop for Windows 10: (4) Fix Mobile Emulators

 

vs

 

In another post: Develop for Windows 10: (3) Setup Tools, I have talked about how to setup development environment in order to start development for Windows 10. It turns out, there was a problem.

Everything goes fine, but after creating a project in VS 2105. Run it. You found the run target doesn’t have Emulator like the picture below.

pg

 

Actually, at the end of VS 2015 installation, there was a warning saying mobile emulators install failed. Why?

The problem was these emulators are running under Hyper-V, which is a virtual machine itself. So, in this case, we are trying to run Hyper-V inside of VirtualBox. So far, there is no way it can work. Fortunately, VMware Player works.

If you are installing Windows 10 TP on a physical machine, like multiple boot. You can skip the following steps, but in any case, make sure you system (your physical machine) meets requirement for Hyper-V. Here is the link.

So follow the steps below. (This is an ugly post, bear with me, and as always, forgive my typos. I will try to fix them later.)

1. Download and install VMWare Player from https://my.vmware.com/web/vmware/downloads,  scroll down to the bottom of the page, locate WmWare Player, click Download Product. Then download WmWare Player for Windows 64-bit.

2. Start WmWare Player.

Create a New Virtual Machine
Choose “I will install the operating system later”, click Next.
Choose Microsoft Windows and select Hyper-V (unsupported) not Windows 10 x64 (don’t ask me why), click Next.
Take a note of the Location (where the VM files a created, I call it {VM Folder}).
Click Next, and Next again.
Click Finish.

Open {VM Folder}\{VM Name}.vmx with Notepad.

Add following line to the end of file:

hypervisor.cpuid.v0 = “FALSE”

Save/close the file.

3. Now go back to VMWare Player, you should see your newly created VM.
Right click it -> Settings.

Highlight Processors, then on the right, Check Virtualize Intel VT-x/EPT or AMD-V/RVI
Highlight CD/DVD (SATA), then on the right, check Use ISO image file, click Browse to select your Windows 10 TP ISO file
Look at bottom of the dialog, click Add button, then select Network Adaptor(use defaults).

Click OK. You are back to the VMWare Player home screen.
Highlight your VM, click the green Power On button.

Now, Windows 10 TP will be installed on your machine. Make sure it is new installation not upgrade.

4. After Windows 10 TP is installed. You are probably getting build 10070. That’s too low, you need to upgrade. Go to Settings -> update and security -> Windows Update -> Advanced Options -> Scroll to the bottom -> Change from Slow to Fast.

Close Settings, then go back to Cortana (you know what I mean), and type Check for update and click it. Make sure get any updates that is higher than 10070. It should be 10130 as of today.

Change update from Fast back to Slow, up to you.

5. Unlock your VM for development. Settings -> update and security -> For Developers. Check Developer Mode.
(Why unlock? Before, any PC or Phone used to running an app outside of Windows Store (called side-load) need to be unlocked. There was a procedure to unlock your machine. Now, in Windows 10, you just turn on Developer Mode, it is unlocked. You can side load any apps.)

Now Install Viusal Studio 2015 RC, make sure choose “Custom”, and check Universal Windows App Development Tools and its suboptions.  (Please check the links Develop for Windows 10: (3) Setup Tools)