Help with locating datasource of application using Clickone

Hi,

I need to locate the xml files in my application's folder but since the application was installed with Clickonce technology its location is not obvious. How do  i locate the application's folder to access the xml files?

Thanks,


Victor
vcharlesAsked:
Who is Participating?
 
Éric MoreauSenior .Net ConsultantCommented:
What code do you have? The code shown on MSDN is the declaration in the library.

MessageBox.Show(ApplicationDeployment.DataDirectory);

Open in new window

0
 
Éric MoreauSenior .Net ConsultantCommented:
you want your application to access the files?
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
vcharlesAuthor Commented:
Hi,
I need to know the path they are located so I can copy them to anothet folder to use in another application.
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
 
vcharlesAuthor Commented:
Hi,

Running into some problems using the code, not certain how the last part of the code "Get" plays a role. Can you please send me the approach you would with the code given.

Thanks,

Victor
0
 
vcharlesAuthor Commented:
I would like to use a botton click event to see the path if possible.
0
 
vcharlesAuthor Commented:
Hi,

Where do I add

Public readonly Propery DataDirectorry as String

Get

End Property

I included it in a class module, but when I run the application the path shown can not be found. For example c:\users\usename\AppData\xxxxxxx\xxxx etc.... I don't see the AppData folder.


I tried MessageBox.Show(ApplicationDeployment.DataDirectory) but ApplicationDeployment does not have a DataDirectory propery,instead I have to use msgbox (ApplicationDeployment.CurrentDeployment.DataDirectory)

Thanks,

Victor
0
 
Éric MoreauSenior .Net ConsultantCommented:
>>Where do I add

You don't. This is provided by the Framework. You just need to use it.

>>instead I have to use msgbox (ApplicationDeployment.CurrentDeployment.DataDirectory

It doesn't give you the value you want? What does it give you?
0
 
vcharlesAuthor Commented:
The path shown takes me to an empty folder, but when  I when follow another folder under the 2.0 folder I see the files. Could it be bcause I am using CurrentDeploy in the code?
0
 
Éric MoreauSenior .Net ConsultantCommented:
One thing for sure, it is not because you are using CurrentDeployment, you need to use it.

I cannot test it because I am sitting home and don't have access to a C-O deployed application.
0
 
vcharlesAuthor Commented:
Thank You.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.