Skip to content

Kinect for Windows – Code Migration from Beta2 to v1.0 (C#/VB)

February 1, 2012

[This article covers the C#/VB accessible APIs. It has a peer article that covers the C++ accessible APIs.]

There have been a number of significant changes and improvements in our APIs since Beta2. This set of documents attempts to detail the changes to facilitate code migration from beta 2 to v1.

[Update – 9:44am PST, 2/1 – fixed link to migration dll below. If you still have problems, clearing browser cache may help.]

API Change Details

[these links take you to a seperate post with details]

Adapting to API Changes

In order to adapt to this change, C#/VB developers should:

  • Backup code projects (if not using source control, such as TFS)
  • Uninstall Beta 2 SDK (including speech runtime 10.x components).
  • Install Kinect for Windows SDK v1.
  • Migrate code to use v1 APIs and best practices via one of the migration techniques below
  • If you need help with the answer, go the Kinect for Windows forums. Search for other similar issues first. If needed, create a new issue. Please prefix the title of the forum post with “Migration issue:”. (for example: “Migration Issue: Runtime.Sensors replacement?”)
  • If you figured out the answer, and want to suggest improvements to the details and techniques in these documents, please leave a comment (We generally will respond to that feedback, but won’t show the comments, as it may get unwieldy).

Where to go for help

Code Migration Techniques (C#/VB)

There are three major approaches to migration

1)      RECOMMENDED: Use a migration reference assembly to assist with learning about API changes

2)      RECOMMENDED: Go back to the examples you may have started from, find the newest versions of those, and transfer your improvements to this new version.

3)      NOT RECOMMENDED: Change reference assembly, (recompile -> search for info -> change -> adapt -> repeat)

Using the Migration reference assembly (RECOMMENDED)
  •   Backup code projects (if not using source   control, such as TFS)
  •   Uninstall Beta 2 SDK (including speech runtime   10.x components).
  •   Install Kinect for Windows SDK v1.
  •   Remove Microsoft.Research.Kinect.dll   references
  •   Download (link is fixed now, may need to clear browser cache if still having problems) and add reference to Microsoft.Kinect.Migration.dll
  •   [Ensure all projects, including binary dependencies,   are migrated]
  •   Build and evaluate errors/warnings

After changing all the “usings” of the old namespace to “using   Microsoft.Kinect;”, most of the errors/warnings will point you to renames of   types/members:

  •   Look for guidance in errors/warnings
  •   Look at sample code in SDK to see changes in   event handling code necessary (there have been significant changes with   ImageFrame and SkeletonFrame).
  •   Change code as necessary -> recompile ->   (repeat)
  •   After building successfully with no errors and   warnings (related to name changes)
    •   Remove reference to   Microsoft.Kinect.Migration.dll
    •   Add reference to Microsoft.Kinect.dll
    •   Run application and debug as necessary
Doing it all manually (NOT RECOMMENDED)
[WE STRONGLY RECOMMEND YOU   FOLLOW THE MIGRATION DLL TECHNIQUE ABOVE…AND DON’T FOLLOW THE MANUAL   TECHNIQUE]

  •   Backup code projects (if not using source   control, such as TFS)
  •   Uninstall Beta 2 SDK (including speech runtime   10.x components).
  •   Install Kinect for Windows SDK v1.
  •   Remove Microsoft.Research.Kinect.dll   references
  •   Add reference to Microsoft.Kinect.dll
  •   [Ensure all projects, including binary dependencies,   are migrated]
  •   Build and evaluate errors/warnings
  •   Look at sample code in SDK to see changes in   event handling code necessary (there have been significant changes with   ImageFrame and SkeletonFrame).
  •   Change code as necessary -> recompile ->   (repeat)
  •   Run application and debug as necessary

From → API, Kinect

6 Comments
  1. AA-Problems with migration dll download
    RR-Yep, putting in .zip to address
    AA-Thanks. Can’t wait to get my hands on it. I have already started doing it manually though. Seems like a better way if one really wants to dive into the new API. But then it is as you said a lot of work if it is a fairly large application.

  2. Where’s the c++ peer article? Thanks
    ®f

    • indigo74 permalink

      Right, where is the C++ peer article ?

      Thanks !

Trackbacks & Pingbacks

  1. Kinect for Windows SDK / 硬體正式推出! « Heresy's Space
  2. [Kinect]Kinect for Windows SDKの正式版が公開されました - TsubokuLab – ツボクラボ -
  3. Kinect SDK 1.0 released « NaoKinect

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: