Having a WP7.5 phone (ala mango) I wanted to start development on an idea I had for a new phone application. Seems simple enough but there’s always a catch (more on that later). First off, in order to conduct any mobile development for a Windows phone you’ll need to download and install the software development kit (SDK -v7.1). This new SDK provides you with all of the tools that you need to develop applications and games for both Windows Phone 7.0 and Windows Phone 7.5 devices. The download is not for the faint of heart as it’s about 500 MB (full setup is ~4 GB) so make sure you have the space and bandwidth available.
If you’re installing this on your local machine with Visual Studio 2010 then you shouldn’t have any problems. I, being the difficult person that I am wanted to install this within a virtual machine (VM) on Windows Server 2008 and that’s where it got interesting. To be fair, the requirements clearly state that “Windows XP, Windows Server, Virtual PC, and Hyper-V are not supported” so I knew I was in uncharted territory.
Based on the aforementioned requirements, this than stands to reason why the SDK won’t allow you to install it on anything but Windows Vista/7. Or will it? Thankfully Aaron Stebner (Senior Test Lead here at Microsoft) has a great blog post that circumvents this requirement. As Aaron mentions, this is not officially supported, so if you try these steps and your machine gets FUBAR’d, you have no one to blame but yourself.
That said, I made the necessary changes and was ready to get started. If the install went smoothly you should now see a new project template called “Silverlight for Windows Phone.” I’ve highlighted a Panorama project type but there are quite a few templates available (I'm using Visual Basic this time but C# works just the same).
So far so good right? Upon compiling and running the default application though I received the following error:
Upon following the dialog box’s instructions, I proceeded to delete those files and re-run the project. I was then presented with this error:
“Windows Phone Emulator is doing a complete OS boot”
Thus ended my emulator experience so a repair of the SDK was necessary and this was accomplished via Control Panel. After the repair was finished I launched the emulator outside of Visual Studio (VS) to make sure it was working and sure enough it was. The emulator is located in the newly created group called “Windows Phone SDK 7.1.” The next step was to go back into VS, reload the project and see what would happen. This time a new error came up but I pushed on and selected “Yes.”
To my astonishment, the project loaded and was connected to the emulator.
Breakpoints and all the other debugger items worked as well.
So what worked? Well outside of lighting incense and praying to the bit God’s, honestly I’m not quite sure. I do know that I’m extremely happy to now have the ability to develop a Windows phone application within a VM as I do most of my work in multiple VM’s due to the need for different configurations (both software and hardware). Hopefully in the not so distant future doing this type of development on Windows Server will be supported (Windows 8?) but in the meantime this is a possible workaround. Cheers!