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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
you want your application to access the files?
0
Éric MoreauSenior .Net ConsultantCommented:
0
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
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

É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
É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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.