Guide: How to Install and Run Windows 8 and Visual Studio 2012 with Phone Emulator in Virtual Machine

21 בפברואר 2013

Many developers that want to develop apps for Windows Phone 8 are required to install Windows 8 on their PCs, because Visual Studio 2012 that allows developing projects for Windows Phone 8 require this. Also, phone emulator in VS12 requires Hyper-V option that isn’t included in Windows 7. In this post I’ll explain how to avoid installing Windows 8 in order to run VS12 with phone emulator.

1. Get Windows Setup: If you don’t have your own installation of Windows 8 you can download it for free from Microsoft’s website: http://msdn.microsoft.com/en-us/evalcenter/jj554510.aspx

image

(You can download one of two available versions: 32 or 64 bit)

2. Get Virtual Machine: The best VM that I found running Win8 with VS12 and phone-emulator is VMware Player that can be downloaded from here: http://www.vmware.com/products/player

image

(Install the downloaded VMware Player before proceeding with next steps)

3. Install Windows 8 in VM: Player > File > New virtual Machine

image

3.1) Pick 2nd option and select downloaded ISO file with Windows 8 setup:

image

3.2) Enter new VM’s name and installation folder (keep in mind that you need about 20-30GB space on HD):

image

3.3) Use these defaults:

image

3.4) Before finishing this stage, click on ‘Customize Hardware’:

image

3.5) Minimum recommended memory size should be 2GB:

image

3.6) Define processor with 2 cores and ‘Virtualize Intel VT-x/EPT or AMD-V/RVI’ in Virtualization Engine:

image

(Selected virtualization engine is required to run phone-emulator. We’ll define an additional option that is required for this later)

3.7) Close HW dialog and click ‘Finish’ in this dialog:

image

(The Win8 setup will start after this)

4. Install Windows 8 on VM:

4.1) Define your language, time and keyboard setting and click ‘Next’:

image

4.2) Click ‘Install’ and continue with remained steps:

image

4.3) Click on 2nd button ‘Custom: Install Windows only (advanced)’ and proceed with remained:

image

4.4) Enter PC name and click ‘Next’:

image

4.5) Use ‘Express Settings’ or customize:

image

4.6) You can sign in without MS account or use your Live-ID (I used the last option in this guide):

image

4.7) Now we’re ready with Windows 8 on our VM. Click ‘I Finished Installing’ on bottom bar of the VM Player:

image

4.7.1) Install VMware tools that will make your work with VM easier: Player > Manage > Install VMware Tools:

image

4.7.2) Click on popup that asks what to do with inserted disk:

image

4.7.3) Run setup file:

image

4.7.4) Proceed with setup:

image

4.7.5) Don’t restart the system after finishing the setup:

image

4.8) Shutdown the system. Hit [Win + Q] on keyboard to open ‘Settings’ and click Power > Shut down to power-off:

image

5) Edit VM Settings: Let’s add some small ‘hack’ to allow HW Virtualization in VM Smile

image

(Click on ‘Edit virtual machine settings)

5.1) Go to ‘Options’ tab and copy ‘Working directory’ path [Ctrl + C]:

image

(Open copied path in Windows Explorer)

5.2) Locate file with ‘vmx’ extension and open it in some file editor:

image

5.3) Add hypervisor.cpuid.v0 = "FALSE" to existing settings and save file:

image

(Ensure that “ symbols with correct format and close the editor)

6) Let’s install VS12: Play VM:

image

6.1) Open IE:

image

6.2) Go to this web-page: http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-windows-phone

image

(Click ‘Download’)

6.3) Pick preferred setup file for download:

image

(I preferred 1st ver. for this guide)

6.4) Execute setup by clicking ‘Run’ on bottom bar:

image

6.5) Proceed with VS12 Setup:

image

image

(Allow setup to restart system at the end)

7) Let’s Rock & Roll: Open ‘VS for Windows Phone’:

image

7.1) We can ignore registration for this time:

image

7.2) Create new project:

image

7.3) Pick ‘Windows Phone Panorama App’ or any other phone app:

image

7.4) Select ‘Windows Phone OS 8.0’:

image

7.5) Now we run our App in Emulator:

image

7.6) Because we didn’t ran VS in Admin Mode it will ask us to allow to access to some Hyper-V stuff:

image

(Click ‘Retry’)

7.7) Allow making changes (be nice):

image

7.8) Almost done. Allow emulator to access the Internet:

image

7.9) Ta-Da SmileNow we see phone-emulator running over Hyper-V inside our VM:

image

You can use all phone features:

image

Enjoy 😉

Remarks: Any comments/improvements will be accepted with pleasure. Of course, you must understand that this code is a contribution and I’m not responsible for any damage that may be caused by using it. All rights reserved ®.

PS
This post was inspired by Tamir’s post about VS12 Setup Hack for Win7:
http://khason.net/tech/installation-of-windows-phone-sdk-8-0-on-windows-7

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

*

3 comments

  1. Mark22 בפברואר 2013 ב 6:50

    Thanks Man! I tried to setup W8 emulator for days and this post helped me 🙂

    Reply
  2. johnny15 במרץ 2013 ב 6:27

    Hello! I really love this blog. Tell me please – from where do you have information for ths blog%3

    Reply
  3. Arun Mahendrakar30 באוגוסט 2013 ב 6:33

    Seriously? This probably is the most complicated setup procedure that MS has come up with so far. I'll wait on Win Phone development until MS comes up with a simpler way.

    Arun

    Reply