views:

418

answers:

3

I am making a new Visual Studio 2008 project that integrates all the DLLS and EXEs and make it a ClickOnce Project and to publish it.The issue is that I have some XML files that store the localization data.I am adding all the files as link files to the solution project and then building and publishing.

I have set for say en.xml Build Action: Content Copy to Output Directory: Copy always.

Issue is that my code throws error though it is deployed published,Locally it says

[System.IO.DirectoryNotFoundException] = {"Could not find a part of the path....C:\\Documents and Settings\\Administrator\\Local Settings\\Apps\\2.0\\LC3ZB971.JW1

seems like it is not created in the Cache when the app is running?

Any help?

A: 

Looks like it's installing the link and not the actual file. Try putting the actual xml in the project rather than links to them.

Ray
ok let me try now
abmv
+1  A: 

I ran into a problem with XML files publishing incorrectly using ClickOnce. I asked a similar question and got this answer on StackOverflow

Please double check that your xml files really are being installed where you think they are.

In the publish settings you can change the setting for each xml file from data file to include. Your other files will already be set to include.

Note that the publish settings are independent of the build settings for the file.

Maybe this will help you out.

discorax
Thanks a mil for your reply,checked it out sorta got somewhere with it.
abmv
A: 

ClickOnce marks XML files as 'data' by default. So after adding them to the project and setting the build action and copy property, you need to go into the Application Files dialog that is under the Publish tab, find the file, and change it from Data to Include. IF it is Data, it puts it in the Data folder under the ClickOnce cache, and you have to use the right ApplicationDeployment variable to find it.

RobinDotNet