I have got this error in WPF application.
Invalid filename. TitleContainer.OpenStream requires a relative URI.
pic_texture = Texture2D.FromStream(GraphicsDevice, TitleContainer.OpenStream(@"\Images\performer.png"));
I have tried also
@"/WpfControlLibrary1;component/Images/performer.png"
No success…
if I do like this
pic_texture = Texture2D.FromStream(GraphicsDevice, TitleContainer.OpenStream(@"performer.png"));
and put file in the root
The error is:
Error loading “performer.png”. File not found.
Any clue?
Thank you!
P.S. I am sure file is OK.


UPDATE:
This post https://gamedev.stackexchange.com/questions/9748/xna-am-i-screwing-up-the-loadcontent-for-texture2d doesn’t help also.
i’m partially guessing here, but try
without the first
\Debugging
In your program, add these lines immidiately before the line where your error happens.
make sure you have
at the top of the code file.
Once you’ve done that, Search your computer for
"myUniqueFile.txt"and tell me in the comments where you’ve found it.