Kinect for Windows – Code Migration from Beta2 to v1.0 (C#/VB)
[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]
- Namespace and Assembly Name changes
- Runtime type (Rename to KinectSensor, refactoring)
- ColorImage API changes
- DepthImage API changes
- Skeleton API changes
- Mapping API changes (Skeleton -> Depth, Depth -> Color)
- Audio API changes
- Speech API changes
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)|
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:
|Doing it all manually (NOT RECOMMENDED)|
|[WE STRONGLY RECOMMEND YOU FOLLOW THE MIGRATION DLL TECHNIQUE ABOVE…AND DON’T FOLLOW THE MANUAL TECHNIQUE]