Sign in to follow this  
Gruik

[Managed] Incredible FileNotFoundException

Recommended Posts

Well, i've tried to run a little application on another computer of mine But there's an unhandled "System.IO.FileNotFound" exception. I first thought it was the textures he couldnt load (the not found file may be one of the texture), but now i've put an OpenFileDialog, i think there's no more problem with texture file path. I've installed latest .net framework and directx 9.0c. I've also installed this : http://www.microsoft.com/downloads/details.aspx?FamilyId=402111C4-6478-46C1-BBD9-1BF9FCCE52F4&displaylang=en But no way to launch the app Any idea? thanks

Share this post


Link to post
Share on other sites
I would see if every file you use, when you run your project from inside your development environment, is in the same relative path on the other PC. If it isn´t, copy it there?
Don´t know.... the only file you mentioned was a texture file, and you said, you already put in a filechooser dialogue for that, so no clue.

Share this post


Link to post
Share on other sites
I've tried many things about the path of the texture i load (setting it absolute, like "c:\tex.bmp")

The produced executable seems to be standalone. The texture may not be loaded before i choose it with the Dialog. So the application should not crash at the startup.
I can copy the executable everywhere in the harddrive of my working pc, and launch it successfully.

Anyway, an error during texture loading won't produce an IO.FileNotFoundException but a DirectXException (that i catch)

But the strangiest thing is that, when i comment all lines about textures, it works!!! (i dont have the texture but there's no crash)

So, wtf?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this