I want to edit the user.config file from the installer or a test that is not part of the application with the config I want to edit. Therefore I need a path for user.config.
Path to user.config is like this: c:\Users\SomeUser\AppData\Local\SomeApp\SomeAppName.exe_StrongName_2ndz3ofoffkd0gg0sv1qxyrthr3yi236\2.4.2.0\.
With ConfigurationManager.OpenExeConfiguration(...) I get just *.exe.config path from installation folder and not AppData.
The second option is to fold the path. I can get everything except the correct StrongName hash 2ndz3ofoffkd0gg0sv1qxyrthr3yi236 which does not match the StrongName (PublicKeyToken) from the assembly.
Can you advise me to programmatically change user.config?
The following method can potentially help you: