dotnetmonitor.com

 
Index
Previous
Next

 

If you want to get to the path programmatically, you can do it using the Configuration Management API. For example, here is how you can get the local user.config file path:

*Note: You need to add a reference to System.Configuration.dll

Configuration config =

ConfigurationManager.OpenExeConfiguration(

ConfigurationUserLevel.PerUserRoamingAndLocal);

Console.WriteLine("Local user config path: {0}", config.FilePath);

What is the difference between application scoped and user scoped settings?
Why cant I change application scoped settings at runtime?
Where is the user.config file located in a non-Clickonce app?
Why is the user.config path so obscure?
Why is there a version number in the user.config path?