All, I am doing the usual thing of writing application settings to the 'application.exe.config' file using
Properties.Settings.Default.SomeSetting = someVal;
Properties.Settings.Default.Save();
I have been asked to persist settings between installations and there are two routes; switch to using the registry, or save the .config file to a separate Special Folder that is persisted between installations (I have chosen the later due to number of settings).
My .config gets written to an odd directory, namely
C:\Users\Administrator\AppData\Local\MyApp\
MyApp.vshost.exe_Url_mzfwtdo5po4pcuabybebhsn5yfltbb3w\1.0.0.0
My question is: how do I pick this directory up in C#?
Note: I have tried
string appPath = Application.ExecutablePath;
Configuration config = ConfigurationManager.OpenExeConfiguration(appPath);
string strIPACostConfigFile = config.FilePath;
Which gives me the initial .config in the installation directory.
Thanks for your time.