This project has moved and is read-only. For the latest updates, please go here.

Problems building for Xbox 360

Topics: Developer Forum, User Forum
Dec 6, 2008 at 9:10 PM

I've been having problem after problem trying to build and deploy my FarSeer project to 360.

I've downloaded and built the Farseer XNA Only project, added a reference to the DLL in my project, and all is fine building for x86, but when I try to build for 360 I get the following error:

The type 'Microsoft.Xna.Framework.Vector2' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework, Version=, Culture=neutral, PublicKeyToken=6d5c3888ef60e27d'.

The reference to the 360 version of Microsoft.Xna.Framework is definitely there. I assumed this is because FarSeer was built with the x86 profile. In the FarSeer physics project, if I right-click the project and select "Create copy of project for Xbox 360", it fails to build with this error:

Vertices.cs(15,34): error CS0246: The type or namespace name 'Vector2' could not be found (are you missing a using directive or an assembly reference?)

followed by about 500 similar lines.

How do I build for Xbox 360?

Dec 6, 2008 at 9:31 PM
We do not have an Xbox360, so we could not test it.

I've just tried to compile a Xbox360 version of the project and it seems you are right. I tested it before release, but something must have changed or I have missed something.

Anyway, here is the steps to make it compile on Xbox360:

1. Rightclick on the FarseerPhysics project and choose "Create Copy of Project for Xbox360"
2. Rightclick on the new Xbox360 project and select properties
3. Go to the Build tab and select "All Configurations" from the dropdown at the top
4. Change the Conditional compilation symbols to this: "XBOX;XBOX360;XNA"
5. Close properties
6. Remove the line: "[assembly: AssemblyFileVersion("")]" from AssemblyInfo.cs inside the Properties folder in the Xbox360 project
7. Change line 495 inside Path.cs (in xbox360 project) to this: Vector2 n = Vector2.Zero;

That should be it. Sorry about that, will upload an updated version later today.
Dec 6, 2008 at 10:07 PM
Working perfectly!

Thank you for your quick reply and clear instructions.
Dec 6, 2008 at 10:43 PM
Ah, spoke too soon.

It BUILDS fine, but when deploying to the Xbox, the Xbox says:

"The game you are launching is corrupt"

and Visual Studio says:

"Unable to start program 9e410531......"

I read someone the devs here don't own Xbox 360s, so if anyone else could shed some light on this I'd be grateful.
Dec 6, 2008 at 10:49 PM
My mistake, I had a build configuration incorrectly labelled, it was actually building for x86.

All fixed and working now.
Dec 6, 2008 at 10:51 PM
Great to hear deadstar.