5 Replies - 1055 Views - Last Post: 30 May 2012 - 04:09 AM

#1 Mallaboro  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 26-April 10

Trouble packaging content

Posted 25 May 2012 - 12:15 PM

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


Is This A Good Question/Topic? 0
  • +

Replies To: Trouble packaging content

#2 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: Trouble packaging content

Posted 25 May 2012 - 03:29 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.
Was This Post Helpful? 0
  • +
  • -

#3 Mallaboro  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 26-April 10

Re: Trouble packaging content

Posted 27 May 2012 - 12:46 PM

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

Was This Post Helpful? 0
  • +
  • -

#4 Mallaboro  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 26-April 10

Re: Trouble packaging content

Posted 28 May 2012 - 10:02 PM

bump? :<
Was This Post Helpful? 0
  • +
  • -

#5 DanielLeone  Icon User is offline

  • D.I.C Head

Reputation: 22
  • View blog
  • Posts: 177
  • Joined: 04-February 12

Re: Trouble packaging content

Posted 29 May 2012 - 02:36 AM

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.

Hope that helped,
Daniel,
Was This Post Helpful? 0
  • +
  • -

#6 Mallaboro  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 55
  • Joined: 26-April 10

Re: Trouble packaging content

Posted 30 May 2012 - 04:09 AM

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1