Question

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...


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

Was it helpful?

Solution

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.

OTHER TIPS

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?

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top