Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Whenever I try and run a game made in XNA 4.0 on a machine other than one used for development, it just won't run. I've followed the instructions here to ensure that all the dependencies are present.

To be clear I've done the following:

  1. Downloaded and installed the Microsoft .NET Framework 4 Client Profile.

  2. Downloaded and installed the Microsoft XNA Framework Redistributable 4.0.

  3. Made sure I am not using anything contained within GamerServices and XNA.Net.*, my references are as follows:

Microsoft.Xna.Framework
Microsoft.Xna.Framework.Avatar
Microsoft.Xna.Framework.Game
Microsoft.Xna.Framework.Graphics
Microsoft.Xna.Framework.Storage
Microsoft.Xna.Framework.Video
Microsoft.Xna.Framework.Xact
mscorlib
System System.Core
System.Windows.Forms
System.Xml
System.Xml.Linq

I also followed the advice here to ensure the problem was not within the code itself.


I've tried the follow methods to get it to run (on both Vista and 7):

  • Use the built in publishing functionality. This results in an error saying that Microsoft.Xna.Input.Touch needs to be present in the GAC. I've tried adding Microsoft.Xna.Input.Touch to the references, and this does not fix the issue.
  • Copy the XNA dll files locally. This results in an error message stating that Microsoft.Xna.Game.dll or one of its dependencies could not be located.
  • Copy over everything contained in Release. This results in an Application X stopped working... or APPCRASH error message the second it starts. My code is never reached.

Is there any way to get this to work? I've been trying to get this to work with the deadline looming, and it's been a source of unneeded stress.

share|improve this question
    
Make sure your XNA project actually targets the .NET Client 4.0 profile. I've seen people make that mistake. Could you say what happens when you run it. Does something come up? –  Michael Coleman Dec 13 '10 at 23:02
    
Yeah, sorry I forgot to mention that. It does target the .NET Client 4.0 profile. All the output that ever happens it in the question (nothing ever shows but the error). –  Paul Dec 13 '10 at 23:05
    
Make sure the appropriate version of DirectX is installed on that machine? –  Michael Coleman Dec 14 '10 at 3:24
    
@Omnion I'm reasonably sure that the XNA redistributable bundles the appropriate version of DirectX. –  Andrew Russell Dec 14 '10 at 3:35
    
There were issues of this in the earlier versions. I simply forgot :( –  Michael Coleman Dec 15 '10 at 2:37
add comment

1 Answer

up vote 6 down vote accepted

A clue may lie in the fact that there shouldn't be any Xna.Input.Touch reference in a windows project - XNA 4.0 only supports touch on WP7. Are you sure you have XNA 4.0 installed and not the beta, which did support Xna.Input.Touch on windows?

share|improve this answer
    
This is the first thing I thought of when I saw Microsoft.Xna.Input.Touch. If OP is developing with XNA 4.0 rtw but started the project with the beta, he's got some munging to do to update references. –  Chris Charabaruk Dec 14 '10 at 6:11
    
Yes, this was it. Even though I had the correct version of XNA, VS insisted on using the old assemblies (which were somehow still kicking around). Thanks for the answer. –  Paul Dec 14 '10 at 19:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.