Error creating service xinputgamepad when using XBOX Controller to connect Lego NXT to MRDS

386 Views Asked by At

I'm trying to implement the simple Robotics example connecting my Lego NXT to MRDS using an xbox controller (Microsoft Robotics Studio and Lego Mindstorms NXT)

Everything compiles fine but when I go to run the service I get the following error:

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

This is the output of the build:

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]

I'm running Mircosoft Robotics Studio Beta 4 and I know the sample was put together back in 2007 so it could be a mix-up there. This is my partnership code:

[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();

I can see the problem seems to be that it is looking for xinputgamepad.user but the reference in MRDS 4 is user.xinputgamepad.

Any ideas?

1

There are 1 best solutions below

0
On

My suspicion is that you don't have the proper version of XNA installed given the 2006 year in the XInput contract.

There should be very similar code in the most recent release of Robotics Studio. Take a look here: http://msdn.microsoft.com/en-us/robotics/aa731520