0

我正在尝试使用 xbox 控制器(Microsoft Robotics Studio 和 Lego Mindstorms NXT)实现将我的 Lego NXT 连接到 MRDS 的简单机器人示例

一切都可以正常编译,但是当我运行该服务时,出现以下错误:

*** Error creating service. Service type:http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html

这是构建的输出:

Not processing file:c:\users\matthew\microsoft robotics dev studio 4    beta\bin\xinputgamepad.y2006.m09.dll
*   Contract directory cache refresh complete [10/25/2011 21:22:18][]
*** Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html [10/25/2011 21:22:18][]
*** Exception during service type creation: System.IO.FileNotFoundException: Could not load implementation assembly for: http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
at Microsoft.Dss.Services.Constructor.ConstructService.Process() [10/25/2011 21:22:18][]
*** "TaskExecutionWorker:HandleException": Exception:System.IO.FileNotFoundException: Could not load implementation assembly for:      http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html
   at Microsoft.Dss.Services.Constructor.ConstructService.Process()
   at Microsoft.Dss.Services.Constructor.InternalConstructor.CreateNewServiceHandler(ConstructService Create)
at Microsoft.Ccr.Core.Task`1.Execute()
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecuteTaskHelper(ITask currentTask)
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecuteTask(ITask& currentTask, DispatcherQueue p, Boolean bypassExecute)
at Microsoft.Ccr.Core.TaskExecutionWorker.ExecutionLoop()
*** Error creating service. Service type:http://schemas.microsoft.com/robotics/2006/09/xinputgamepad.user.html [10/25/2011 21:22:18][http://buzzman-pc.mex.com.au:40000/constructor]

我正在运行 Mircosoft Robotics Studio Beta 4,我知道该示例是在 2007 年组合在一起的,因此可能会出现混淆。这是我的合作伙伴代码:

[Partner("drive", Contract=drive.Contract.Identifier, CreationPolicy=PartnerCreationPolicy.UseExisting)]
    private drive.DriveOperations _drivePort = new drive.DriveOperations();
    [Partner("XInputGamepad", Contract = gamepad.Contract.Identifier, CreationPolicy = PartnerCreationPolicy.CreateAlways)]
    private gamepad.XInputGamepadOperations _gamepadPort = new gamepad.XInputGamepadOperations();

我可以看到问题似乎是它正在寻找xinputgamepad.user但 MRDS 4 中的参考是 user.xinputgamepad。

有任何想法吗?

4

1 回答 1

0

我的怀疑是,鉴于 XInput 合同中的 2006 年,您没有安装正确版本的 XNA。

在最新版本的 Robotics Studio 中应该有非常相似的代码。看看这里:http: //msdn.microsoft.com/en-us/robotics/aa731520

于 2012-02-24T17:44:30.670 回答