'Where does an application store user.config?
I have on my PC a C# WinForms application which was installed via MS click-once deployment.
I can see that the user.config file used by Settings is located in a folder under:
C:\Users\<me>\AppData\Local\Apps\2.0\Data\<several other folders>\Data\<version string>
but those other folders have seemingly meaningless random names.
How does the app (or the framework, really) know where to find that user.config file?
I need to access it from another application, and don't want to have to open a "Find File" dialog for the User to do it...
I have tried searching the Registry for that location, without success.
Thanks
Solution 1:[1]
Application directory
Examine the value of Environment.GetFolderPath(SpecialFolder.ApplicationData) for the exact directory for the current user.
Solution 2:[2]
I found the local user settings stored C:\Users\ currentUserName \AppData\Local\ my_application
Where as Environment.GetFolderPath(SpecialFolder.ApplicationData) returned
C:\Users\ currentUserName \AppData\Roaming
But thanks to @raulmd13 for the clue
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | raulmd13 |
| Solution 2 | Gideon |
