Friday, April 18, 2014

Virtualize Windows Phone 8/8.1 development

Problem:
Microsoft has released Windows Phone 8.1 for developers.  Naturally I am just finishing my first real WP8 app using the 8.0 SDK.  Until now I have hosted the bits on my native system with no virtualization.  I thought I should have a vm for each version of the phone os. I was getting ready to dive into Hyper-V but realized an issue.  You see the windows phone emulator runs as a separate vm on top of the native OS.  If I did manage to build my dev environment in one vm I would either need to run the emulator within the vm.  That is a vm inside another vm which Hyper V will not support or connect a phone emulator vm to the dev vm in hyperv.  This sounds terribly complex for my peabrain.

Solution:
I decided to go old school and use an old Scott Hanselman post about boot to VHD.  In fact, the Nokia site actually links to Scott's site directly.  Here is the solution long and short:

1.) Create a vhd on your native os.  Mine is Win 8.1 Enterprise x64.
2.) Change your BIOS'es boot order. We want boot to usb.
3.) Create the USB thumbdrive with requiste OS bits (Scott describes this in his article)
4.) Boot to usb and initialize the vhd with the target OS Windows 8.1
5.) Complete setup
6.) Install VS 2013 RC2 which will include the 8.1 SDK
https://dev.windowsphone.com/en-us/downloadsdk

Done!
Source:
 
How to virtualize the Windows Phone environment

Windows Phone 8 Emulator in a Windows 8 VHD
Create VHD from Scott Hanselman

No comments:

Post a Comment