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
.
Why is Instructions.xml
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.
The XML file is probably in the ClickOnce data directory (XML files are automatically marked as data files).
Read Accessing Local and Remote Data in ClickOnce Applications (MSDN). 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:
If you want to use it as a data file, there is an example in the mentioned article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With