用旧版SDK编写项目,现在运行在最新的SDK中,Microsoft.Research.Kinect.Nui不存在 [英] project writing with old version SDK, running in the latest SDK now, Microsoft.Research.Kinect.Nui does not exist

查看:151
本文介绍了用旧版SDK编写项目,现在运行在最新的SDK中,Microsoft.Research.Kinect.Nui不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

using Microsoft.Research.Kinect.Nui; using System.IO; namespace SkeletalViewers { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } Runtime nui; int totalFrames = 0; int lastFrames = 0; DateTime lastTime = DateTime.MaxValue; LinkedList<TimestampedFrame> depthFrames = new LinkedList<TimestampedFrame>(); LinkedList<TimestampedFrame> colorFrames = new LinkedList<TimestampedFrame>(); LinkedList<TimestampledSkeletionFrame> skeletonFrames = new LinkedList<TimestampledSkeletionFrame>(); bool subscribed = false; // We want to control how depth data gets converted into false-color data // for more intuitive visualization, so we keep 32-bit color frame buffer versions of // these, to be updated whenever we receive and process a 16-bit frame. const int RED_IDX = 2; const int GREEN_IDX = 1; const int BLUE_IDX = 0; byte[] depthFrame32 = new byte[320 * 240 * 4]; bool savedDepth = false;

以上是代码片段。

该程序在"使用Microsoft.Research.Kinect.Nui; "和"InitializeComponent();"

The program has problem in "using Microsoft.Research.Kinect.Nui;" and "InitializeComponent();"

问题是这样的:

(1)命名空间中不存在类型或命名空间名称"Research" 'Microsoft'(你错过了程序集引用吗?)

(1) The type or namespace name 'Research' does not exist in the namespace
'Microsoft' (are you missing an assembly reference?)

实际上,我正在尝试删除它并添加Microsoft.Kinect(new sdk)。

Actually, I'm trying to remove it and add Microsoft.Kinect(new sdk).

这个问题已经以这种方式解决了。但是仍然存在以下问题。

This probelm has been solved in this way. But still have the following problem.

(2)当前上下文中不存在InitializeComponent。

(2) InitializeComponent does not exist in the current context.

我知道这可能是一个简单的问题。

I know this maybe a simple question.

我们小组的前任成员构建项目,我现在必须使用新的Kinect SDK维护它。

Our group's previous member build the project and I have to maintain it now using the new Kinect SDK.

我是C#的新手。无论如何,非常感谢你的帮助。

And I'm new to C#. Anyway, thanks very much for the help.

谢谢,




推荐答案

您好zzinuta,

Hi zzinuta,

建议不要手动引用,更改命名空间和更新代码。请按照迁移指南从beta2迁移到1.0版本。

Manually referring, changing the namespace and updating the code is not recommended. Please follow the migration guidelines to migrate from beta2 to 1.0 version.

http://robrelyea.wordpress.com/2012/02/01/k4w-code-migration-from-beta2-to-v1- 0-managed /

这有助于解决您的问题。请发布以进一步澄清。

This helps to fix your issue. Please post for further clarifications.

谢谢,

Bharat。


这篇关于用旧版SDK编写项目,现在运行在最新的SDK中,Microsoft.Research.Kinect.Nui不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆