Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

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
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

you want your application to access the files?
Avatar of Victor  Charles

ASKER

Hi,
I need to know the path they are located so I can copy them to anothet folder to use in another application.
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
I would like to use a botton click event to see the path if possible.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
>>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?
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?
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.
Thank You.