Skip to content
/

Using the Surface SDK with Visual Studio 2010

With the launch of Visual Studio 2010 this week a lot of people will start upgrading to the new version. After the installation was complete I noticed the Surface project and item templates were not available. In this post I explain how to get the entries in Visual Studio 2010.

First of all you need to realize that the templates are part of the Microsoft Surface SDK. If you have it installed, skip the next paragraph.

INSTALLING the SURFACE SDK

If you are running Windows 7 or a Windows Vista x64, you need to apply the changes described in a previous post: .

If you don’t have Visual Studio 2008 on your system and want to start with Visual Studio 2010 from scratch some additional steps are needed patching the Surface SDK Installer. For details on the patch process see the earlier referenced post.

Patching the installer

When you’re patching the MSI with the Orca tool remove also the following conditions:

  1. Select the row with Installed OR (VS2008SPLEVEL AND VS2008CSPROJSUPPORT) OR VCSEXP2008SPLEVEL and choose Drop row
  2. Select the row with Installed OR (VS2008SPLEVEL AND VS2008SPLEVEL >= "#0") OR (VCSEXP2008SPLEVEL AND VCSEXP2008SPLEVEL >= "#0") and choose Drop row
  3. Select the row with Installed OR DEXPLORE and choose Drop row
  4. Select the row with Installed OR VS90DEVENV OR NOT VS2008SPLEVEL and choose Drop row
  5. Select the row with Installed OR VCSHARP90EXPRESS OR NOT VCSEXP2008SPLEVEL and choose Drop row

Copying the Templates from the SDK

Now that you have installed the Surface SDK the subsequent steps are quite simple.

The following lines are for x64 systems. If you’re running on x86 change Program Files (x86) into Program Files.

xcopy /s "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp\Surface\v1.0" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\Surface\1033\"
xcopy /s "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Surface\v1.0" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Surface\1033\"
cd "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
devenv /setup

After this is finished launch Visual Studio 2010.

Screenshot with the "New Project" dialog displaying the Surface Application templates.
The “New Project” dialog with the Surface Application templates listed.

(Remember to select .NET Framework 3.5)

Screenshot with the "Add New Item" dialog displaying the Surface Control templates.
The “Add New Item” dialog with the Surface Control templates listed.

4 Comments

  1. /

    thanks, this helped me out of a never ending install/setup afternoon.
    Except for the last part: I did not upgrade from VS 2008 but startet with 2010 directly. So, to copy Item- and ProjectTemplates I had to look elsewhere: found them under C:Program FilesMicrosoft SDKsSurfacev1.0...
    Oh and one more thing for those who should wonder: that 1033 is a sort of language code, so those with VS using some other language shall use that other code (you will find it...along the path e.g. 1031 is german) in order to see those templates appear because 1033 won't work.

  2. /

    Hi Federico, I have also just started with 2010 from scratch. I have found the Item and ProjectTemplate at "C:Program FilesMicrosoft SDKsSurfacev1.0…" same place. Now where should i copy them in Visual Studio 2010 to get it in working form.

  3. /

    Hi Michael,
    I have developed the code in .NET 2010, sdk2.0 beta and Windows 7 targeting Surface2.0. But now I want to run that application on Surface 1.0. Firstly , Will it run?
    I thought it won't, so now I have loaded sdk 1.0 with the help of a crack on W7, and will work using .net 2008.
    I want to know , if I develop app using these specifications, will my app run on Surface 1.0 successfully?

Trackbacks and Pingbacks

  1. Tweets die vermelden Using the Surface SDK with Visual Studio 2010 | Michaël's coding thoughts -- Topsy.com

Leave a comment