I have a WPF project that I want to deploy via clickonce. I have a folder named "Data" with some files in it which will be created by clickonce in Local App Data folder when I install the application. I want to access those files but I am unable to figure out how to do that . The folder created by clickonce has some random name, it looks like this:
C:\Users\xxxxx\AppData\Local\Apps\2.0\Data\PG220ZY7.R26\B0O5ZOCW.BX7\oatr..tion_0000000000000000_0001.0000_73ac71b3d7a93fc2\Data\Data
How can I access those files since I have no way to know what name the clickonce will assign to that folder?
Check if application is network deployed if not will error. Then you can get the directory with
ApplicationDeployment.CurrentDeployment.DataDirectory
Example from Microsoft