This post will contain my first steps into Windows Phone app developement.
- Virtual Image: https://rasor.wordpress.com/2012/08/13/windows-8-in-vmware-player/
- Notice: Windows Phone 8 app development is supported only on 64-bit Windows 8 Pro or higher. You can’t develop Windows Phone 8 apps on Windows 7, on Windows Server 2008, or on Windows Server 2012.
- SW: http://www.devcamps.ms/windows/downloads
- WP8 SDK – More on WP Dev center
- VSIX for storing your code in Git: http://visualstudiogallery.msdn.microsoft.com/63a7e40d-4d71-4fbb-a23b-d262124b8f4c
Test driving the WP emulator (XDE)
I ran VS2012 as admin. First app was a .NET4.5, WP8 app made from the HTML template.
- Pressing F5 for debug gave me a popup:
- Windows Phone Emulator: “You don’t have permission to modify internal Hyper-V Network adapter settings required to run the emulator”
- Pressed “retry” on the popup showed the emulator and a new popup:
- Windows Phone Emulator: “The Windows Phone Emulator wasn’t able to create the virtual machine: Generic failure”.
- This might help: http://vivekthangaswamy.cintu.com/2012/11/09/the-windows-phone-emulator-requires-hyper-v-your-pc-is-missing-the-following-pre-requisites-required-to-run-hyper-v/
- I enabled admin account, but still no luck.
- Next advise was to modify the VMWare image, so it uses HW virtualization and sets a parameter that lets the guest OS think it is not in a VM: hypervisor.cpuid.v0 = “FALSE”. Shut Down the image and do those changes.
- After boot – again logged in as admin – running VS as admin – Pressing F5 for debug gave me a new popup:
- Windows Phone Emulator: “Do you want to configure the emulator to connect to the Internet?”
- Pressed “Yes”. VS had timed out or in other ways stopped debugging.
- I pressed F5 again and after 10 minutes the emulator showed the WP desktop. After 10 more minutes my app was shown. As you can imagine the CPU was running 100% while starting up the app in the emulator, but now it works. Should I be happy, when it is so slow? Memory was OK around 60% all the time.
- So in fact the emulator is a virtual machine running inside my VMWare virtual machine – in other Words – a nested virtual machine. My VMWare image has 2 processors assigned. Both of them are running 100%, when the emulator is starting.
- Since XDE creates a Hyper-V Virtual Machine, you can fire up “Hyper-V Virtual Machine Connection”. You can now decrease how much resources that VM should use from what is available from the VMWare virtual host. I increased the VMWares no-of-processors from 2 to 3. The XDE guest is still set to using 2 processors. Then it won’t take 100% CPU.
- I logged out as admin and logged in Again as myself. Then ran VS (not as admin). Debugging in the emulator still Worked :-).
But something does not work good. I have had several Blue-screen-of-death. Then I power off the VMWare image – and power on again. It is quite a waiting game to be WP8 developer…
Update: I have later learned that when the emulator need more memory then the VMWare image are not always able to give the emulator a usefull address space. And that causes VMWare image to crash. One way to make this happen more seldom is to give the VMWare image as much memory as possible. I increased mem from 4 GB to 7 GB. Hoping this will be enough.
Now I also found this article: http://www.developer.nokia.com/Community/Wiki/Windows_Phone_8_SDK_on_a_Virtual_Machine_with_Working_Emulator