I've made a platform game which uses text files to contain object locations and paths for sound files and character dialog. Anyway. These text files are in a folder in my content folder. Text files inside the content folder don't seem to have any build action other that 'None' that allows me to run the game via debug.
Erm, so whats the deal with .txt files in the content folder? and whats the deal with .txt files not getting packaged?
Sorry if I've not explained my situation to well.
This post has been edited by Mallaboro: 25 May 2012 - 12:16 PM
You'll probably want to set the "Copy to Output Directory" to "Copy Always" or "Copy If Newer". This will take the file from the content directory and throw it in the appropriate directory for use at runtime.
Sorry for the late reply. I have all my files in the content folder set to Copy Always, and I'm packaging <project name> as XNA creators club project. I'm using XNA 3.0 and VS2008.
After packaging is complete, I go to the location, and I unpack the XNA Creators Club Game Package and store the content in a folder, then I run the clickOnceApplication Deployment Manifest and upon installing the game, I receive an error "Cannot download the application. The application is missing required files. Contact application vendor for assistance."
Additionally, when I try to run the <game name>.exe (application), it only shows the menu screen and when I click to begin the game, the game crashes (which is why I thought it might be having trouble reading .txt files).
This post has been edited by Mallaboro: 27 May 2012 - 12:48 PM
I don't think you should be bumping your posts. I haven't seen it done here for ages.
Firstly, why are you using XNA 3.0, and VS 2008? Not that VS really matters, but there are functionality differences in 4.0.
Secondly, could you try putting your txt file code, (where the game uses the txt file) in a try catch block, or go back to the solution and put some breakpoints. You haven't actually said that the game crashes in debug mode due to the txt files. I would definitely be checking this first.
It doesn't crash in debug mode. I prefer VS2008 because intellisense seems buggy and hotkeys are different on 2010, and I don't like how hotkeys are changed in preferences since nearly every typical keyboard shortcut is used for something already.
Anyway, I'll try putting in a try catch block. The game runs fine in debug mode so I don't see how breakpoints will help and yeah, I don't like bumping threads but this wasn't getting any attention and I've a deadline this friday.