Tuesday, December 7, 2010

[2010.12.07] Installing Microsoft Surface SDK 1.0 SP1

Installing the SDK on a Virtual Machine running Vista

Tools Required:

Now that the Surface SDK v1.0 SP1 is public it is the right time to get familiar with it. Of course, getting it up and running was a bit more entailed that I had anticipated so I thought I would share my experience and hopefully you would have an easier time with it. I ran into a few issues which I wanted to highlight.

First off, Microsoft says that the Surface SDK needs to be installed on a Vista SP1 machine. Since I was running Windows 7 x64, I tried installing and of course it did not work. Stupid me, instead of checking the web immediately for Windows 7 related solutions, I continued to follow the rest of the install steps which was to use a Virtual Machine to host Vista.

[1.1] Installing Virtual PC and Vista

Again, MS recommended Virtual PC 2007 SP1 which can be downloaded for free. I have not had the need to for VPC before so this was the first time I am using one. Either way, installing Virtual PC on Windows 7 went off without a hitch. While it took forever to get the Vista Ultimate x32 image created, that was also painless. However, there is a hotfix which takes VPC from version 6.0.192.0 to 6.0.210.0 and a security update (KB969856) which follows the fix . I found that after installing the hotfix and the security update, VPC fails to recognize the Vista image and it even complains that there is some problem recognizing the host OS (Win 7). Uninstalling both made VPC works as it did before. Basically DO NOT install the hotfix or security update unless you really need them.

Due to the age of Virtual PC, you will find some limitations when it comes to dealing with graphics and widescreen support. In addition, I have tried out VMWare 7.1 Workstation Edition and it does a phenomenal job. The issues I describe below are non-existent and you can easily resize the guest OS as you would a normal window. I would recommend this over VPC if you can get it.

[1.2] Installing the XNA 2.0 Framework

The next bit that you would need is the XNA 2.0 Redistributable. As of this writing XNA 4.0 is out but the SDK will complain loudly as in Fig. 1 if it does not find 2.0 on the machine. Since XNA 2.0 is prerequisite, installing this on the Vista VPC did not go as smoothly as I had hoped as shown in Fig. 2.

[2010.12.07].01.xna2.needed
Fig.1 XNA 2.0 Required even though 4.0 was installled

[2010.12.07].02.xna.timeout
Fig.2 Running XNA 2.0 msi package does nothing

As shown, you get the dialog:
"Please wait while the installer finishes determining your disk space requirements."
To get around this issue, you need to use the command line utility in Administrator mode to get this running. In most cases you can find the Command Prompt in the Accessories folder, Right Click one the prompt icon and choose "Run as Administrator" as in Fig. 2.

[2010.12.07].03.command.prompt
Fig.3 Command Promt run as Administrator

Now navigate to where the XNA 2.0 package (xnafx20_redist.msi) is and invoke it with the following command:
    msiexec /package xnafx20_redist.msi /qr
This will skip the checking space requirement and install the framework to its default location.

[1.3] Installing the Surface SDK

I ran into the same issue as I did with the XNA msi installer, in that, it was stuck checking the space requirements. This is shown in Fig. 4.

[2010.12.07].04.surface.timeout
Fig.4 Surface SDK does not install normally

The solution is the same as the XNA case - simply run the msi package as indicated above from an elevated command prompt.

Fig. 5 shows the results of everything after installation. Note the Surface project templates in Visual Studio 2008 SP1.

[2010.12.07].05.vs2008.surface.template
Fig.5 Surface project template in Visual Studio 2008

2 comments:

Anonymous said...

Hi.. can we deploy the surface applications on the Surface simulator in a virtual PC?

Anonymous said...

I apologize for the late reply. I never tried it. I was only using it for learning and I figure I would do it on a real unit so there was no need for a virtual deploy. Sorry!
~sparky