0

Windows puts .NET app's settings on incredibly obscure paths - our application has them on path:

C:\Users\USERNAME\AppData\Local\COMPANY_NAME\EXECUTABLE_NAME_Url_yhgjvoqwe3bnlu21k1ccbg2qdgwexzsm\1.0.0.0\user.config

I often need to migrate the settings on another machine. Writing an import/export feature would be much more work than just copying the file.

How can I get the path to user.config from within the code of a .NET application? Eg.:

 string settingsPath = Application.GetSettingsPath();
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778
  • 3
    [How do I get the location of the user.config file in programmatically?](//stackoverflow.com/q/9038070) – 001 Jun 21 '18 at 13:49
  • @JohnnyMopp Huh, how did I miss that? Thanks for the link, I'll try it and mark this question as duplicate. – Tomáš Zato Jun 21 '18 at 13:51

0 Answers0