Recommended Posts

I'm almost done with my game :) and I would like to create a demo for my friends to sorta beta test. The problem I've run into is when I publish the game and run the setup.exe it crashes, and I think its because, I've created a custom write and read classes. Which create and read from a xml file. Which work beautifully when just debugging, but it writes the xml file to bin\x86\Debug folder.

I don't know how to get it to write to the content folder. Or integrate it into the content pipeline, if I even need to. Searching the forums and Google I didn't find anything that helps me with already made read and write classes.

Can I use the classes I already made or do I have to start over?

Any help would be greatly appreciated, and thanks for reading.

0

Share this post

Link to post

Share on other sites

Well searching for a few hours finally gave me a solution. I'm amazed, its actually quite simple, and if I didn't jump the gun and post here I'm sure I would of found it a little sooner, and didn't have to bother everyone here.

I just had to load the file into the content folder like a normal texture. Change its properties, build action to "none", copy to output directory to "copy if newer".

In the load and save classes I just had to change the directory to @"Contents\Board.xml" from just "Board.xml", and blam it works great.

Thanks to everyone who read this.

I'd post the link to the forum post, but its at another site, and I think that is frowned upon.