I spent a wasteful amount of time on this, so I wanted to write down what went wrong – both for Future Robert, and anyone else who might be trying to do this. This is what I did to get Windows Phone emulators working with Visual Studio 2015 on Windows 10, on an HP Envy laptop with hardware virtualization.
By the way – Apache Cordova in Visual Studio otherwise works – I only had an issue with the Windows Phone emulator, which is explained below.
Since I’ve been in the “rebuilding” spirit – with rebuilding my main dev VM, and then my main workstation – I wanted to get my laptop working. In particular, there is one thing I can NOT do with a development workstation virtual machine – and that is, run Windows Phone and Windows Store emulators.
For that, I need a real, physical machine. That’s fine, because that’s how I was using my laptop before. So – let me get the latest and greatest!
- Download Windows 10 “Insider Preview” DVD/ISO (I actually got the Enterprise edition from MSDN, so I could install Hyper-V and have remote access) – http://windows.microsoft.com/en-us/windows/preview-iso
- Download Visual Studio Enterprise 2015 Release Candidate (RC) – https://www.visualstudio.com/
I get everything installed – including Hyper-V, which is how Visual Studio does their Windows Phone emulators. However, during the install of Visual Studio I see this:
well, that’s not great. So, I try to download JUST the WP8 emulators from here: https://www.microsoft.com/en-us/download/details.aspx?id=43719 – when I try to install this, I immediately get this error:
It says that it requires Windows 8.1 Pro, 64-bit, and Hyper-V. I’m running Windows 10 Enterprise, 64-bit, and have Hyper-V installed!
Hardware Virtualization and Hyper-V:
I have a HP Envy laptop – which comes with this ridiculously-simple BIOS. So, the only options I have for hardware virtualization are on and off:
In the past, this ALWAYS needed to be disabled. With both Windows 8 and Windows 10, if ever I enable this (with or without Hyper-V installed) – the boot screen just hangs. The screen where you see the circle-spinny-thing just stays on the screen forever.
While researching that, people recommend turning on/off specific hardware virtualization features – but as you can see, all I have available is this Fisher-Price “My First Bios!” (joke: meaning, simple and made for children).
Hyper-V WITHOUT Hardware Virtualization:
The obvious answer to me was just to disable hardware virtualization and install Hyper-V. That works with Windows 8.x and Windows 10. I did that, but I was still getting an error message from the Emulator installer. They point to two sets of requirements:
- Windows Phone Emulator Requirements: https://msdn.microsoft.com/library/windows/apps/ff626524.aspx
- Hyper-V + Windows Phone 8 requirements: https://msdn.microsoft.com/library/windows/apps/jj863509%28v=vs.105%29.aspx
No matter what I tried, I could not get past that error. Hyper-V is installed and works – but the emulators installer is just convinced that Hyper-V just won’t work!
Hyper-V WITH Hardware Virtualization:
So, as a last resort and to see if I could troubleshoot further, I went back into the BIOS and enabled hardware virtualization. A minute later I look back over and I see the Windows login screen. What the? For some strange reason, it did not hang Windows this time! I enabled hardware virtualization and it actually booted – that is a first, for this laptop!
There are two things I did which might account for this – I went to http://support.hp.com and found my specific model:
- I upgraded to the latest BIOS firmware.
- I installed all of the software/drivers they had (including chipset drivers)
I’ll take it! So, I log in – kick off the installer and no error!
and sure enough, the emulator works!
Well, it works with a Windows Phone project in Visual Studio. What about Cordova?
Getting Apache Cordova to work with the Windows Phone emulator:
Well, once the emulators are installed – if you create a new Apache Cordova project:
then, when you choose Windows Phone 8 from the dropdown in the toolbar:
and choose a Windows Phone 8 emulator:
it will either boot up that particular emulator in Hyper-V or create a new VM, and then start it up:
What about Windows Phone 10?
Now, you might have noticed that if you choose “Windows Phone (Universal)”:
that in addition to Windows 8.1 emulators, there are also Windows Phone 10 ones listed. If you choose one of those, you’ll get a deployment error in Visual Studio saying the device is not found.
This is because you need to download the Windows Phone 10 emulator. You can get that from here:
Windows Phone 10 Emulator Download for VS2015
When you run that, it installs the emulators for Hyper-V:
then, when you choose a Windows Phone 10 emulator, it will either start – or create, then start a Windows 10 emulator in Hyper-V:
This post is all about the Windows Phone emulator because everything else “just worked”. I only had an issue with these emulators. So, as of now, using Apache Cordova from within Visual Studio, I can successfully build and run on these emulators:
- Windows Store
- Windows Phone 8.x
- Windows Phone 10
- (Ripple) Android (phone and tablet)
- (Ripple) iPhone
- (Ripple) iPad
Now that I have the basics going, time to figure out how to build and package for each platform!