Compiling errors with Xbox360 project

Apr 4, 2010 at 10:36 AM

Hi,

I created a Xbox360 project (with XNA GameStudio 3.1) and added a reference to XnaInput 1.5.1 but whenever I try to use XnaInput I keep getting errors like these:

 

Error	1	The type 'Microsoft.Xna.Framework.Game' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework.Game, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d'.	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	40
Error	2	The type 'Microsoft.Xna.Framework.GameComponent' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework.Game, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d'.	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	40
Error	3	The best overloaded method match for 'XnaInput.InputManager.InputManager(Microsoft.Xna.Framework.Game)' has some invalid arguments	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	40
Error	4	Argument '1': cannot convert from 'Xbox360Game1.Game1' to 'Microsoft.Xna.Framework.Game'	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	40
Error	5	The type 'Microsoft.Xna.Framework.Input.Keys' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework, Version=3.1.0.0, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d'.	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	78
Error	6	The best overloaded method match for 'XnaInput.KeyboardHelper.JustPressed(Microsoft.Xna.Framework.Input.Keys)' has some invalid arguments	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	78
Error	7	Argument '1': cannot convert from 'Microsoft.Xna.Framework.Input.Keys [c:\Program Files\Microsoft XNA\XNA Game Studio\v3.1\References\Xbox360\Microsoft.Xna.Framework.dll]' to 'Microsoft.Xna.Framework.Input.Keys []'	C:\Documents and Settings\Thuan\My Documents\XnaInput1.5.1\Xbox360Game1\Game1.cs	78

On a regular Windows project it works fine however.  Any ideas?

 

Apr 4, 2010 at 3:00 PM

Update:

Instead of using the provided solution/project files in the source archive, I created a new project file and added the source files into it.  Still compiles fine on Windows but on Xbox360 target I get another error which happens in a few places:

error CS1501: No overload for method 'Parse' takes '2' arguments

For a line like this:

 

MouseHelper.Button mouse_button = (MouseHelper.Button)Enum.Parse(typeof(MouseHelper.Button), parts[1]);

I just commented out the body of the methods which use the Parse() function - MapPadString, MapKeyboardString, & MapMouseString - and now it compiles.