Victor Charles
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
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
you want your application to access the files?
isn't it CurrentUserApplicationData ? check https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.specialdirectories_members(VS.80).aspx
ASKER
Hi,
I need to know the path they are located so I can copy them to anothet folder to use in another application.
I need to know the path they are located so I can copy them to anothet folder to use in another application.
I think this is what you want: https://msdn.microsoft.com/en-us/library/system.deployment.application.applicationdeployment.datadirectory.aspx
ASKER
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
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
ASKER
I would like to use a botton click event to see the path if possible.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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\x xxxxxx\xxx x etc.... I don't see the AppData folder.
I tried MessageBox.Show(Applicatio nDeploymen t.DataDire ctory) but ApplicationDeployment does not have a DataDirectory propery,instead I have to use msgbox (ApplicationDeployment.Cur rentDeploy ment.DataD irectory)
Thanks,
Victor
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\x
I tried MessageBox.Show(Applicatio
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.Cur rentDeploy ment.DataD irectory
It doesn't give you the value you want? What does it give you?
You don't. This is provided by the Framework. You just need to use it.
>>instead I have to use msgbox (ApplicationDeployment.Cur
It doesn't give you the value you want? What does it give you?
ASKER
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.
I cannot test it because I am sitting home and don't have access to a C-O deployed application.
ASKER
Thank You.