I have a main application that saves settings to a user.config file.
I have a second app that needs to read a setting from this file.
Is there a simple/elegant way to get the location of the user.config file of the main app?
I guess i could build up the path manually from
[Application.LocalUserAppDataPath][CompanyName][AppName
+ some sort of guid][App version]
but that seems mightily hacky.
The logic for creating a path to the place where the user configuration file lives is typically build into the application, escpecially the parts
so there is not general way to ask the framework where the user config is stored.
However, we solved this issue for our program system by providing a common DLL for all apps containing a function like this
This function gets you the same user configuration for all of your applications.