views:

508

answers:

6

Hi, I have develop an XNA game on computer 1. When I send it to computer two (and I have everything to be able to run XNA Code). When the program execute game.run, I get an InvalidOperationException.

I didn't tried to run code from computer two on computer one. But I know that both machine can run the code I've wrote on them.

Do you have any idea ?

EDIT : Oh, I added the asnwer, but I can't select my post as the answer...

A: 

The docs say Game.Run will throw that exception if Game.Run is called more than once. What does the rest of the exception say? i.e. Message, StackTrace, etc?

Gerald
A: 

CallStack :

App.exe!App.Program.Main(string[] args = {Dimensions:[0]}) Line 14 C#

And here is the code

static class Program
{
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    static void Main(string[] args)
    {
        using (Game1 game = new Game1())
        {
            game.Run();
        }
    }
}

And the same code run on another machine

Patrick Parent
What about the Message?
Gerald
A: 

My first question would be, what is the rest of the error? Without that it'll be hard to diagnose this. If I were to give an educated guess, I'd have to say you either don't have the proper XNA runtimes installed, or your video card doesn't support Shader Model 2.0.

Ryan Taylor
A: 

I know that my video card support it because I can run other XNA program that I wrote. I'll post the error in as soon as I get to my computer later today.

Patrick Parent
A: 

Are there any .dll files that you need to package with the project that the other computer may be missing? Dependency Walker might be useful for determining which (if any) these are.

Ross Anderson
+2  A: 

I finally found the problem. For a reason, the hardware acceleration setting was set to None. So the project wouldn't start.

Thanks for all your reply.

Patrick Parent