views:

47

answers:

1

I'm developing an application using MS Visual C# 2008 Express that uses the ClickOnce deployment functionality. I publish the application to a a server where users can download it.

Upon running the application, it throws a file not found exception - it cannot find the XML file that the application pulls data from (Instructions.xml).

When I go to the server and into the Application Files folder, I see .deploy files. One of them is for Instructions.xml.deploy.

Any ideas on why Instructions.xml is not being included in the user's download?

Of course, if I manually copy Instructions.xml to my personal copy of the program, the program works fine. But the publishing process is supposed to (via Instructions.xml.deploy?) copy / deploy this file automatically.

+4  A: 

The xml file is probably in the clickonce data directory (XML files are automatically marked as data files). Read this, it explains how data files are used and accessed using ClickOnce. If you want to publish the xml file as an application file (you want it published to the same directory as the application), follow the steps below:

  1. Go into your Project's properties
  2. Go to the publish tab.
  3. Click "Application Files"
  4. Find your xml file in the list and change the "Publish Status" of your file to "Include".
  5. Change "Download Group" to "Required".

If you want to use it as a data file, there is an example on the provided link above.

thedugas
This worked perfectly. Thanks!
Anthony