Search code examples
c#pathsettingsproperties.settings

Properties.Settings.Default.Save() store the user.config file in a directory with a hash


I try to save user settings. To save some data I used this code:

Properties.Settings settings = Properties.Settings.Default;
settings.Key1 = "value";
settings.Save();

but it saves the user.config file under the following path:

C:\Users\Me\AppData\Local\[CompanyName]\[ExeName]_Url_[some_hash]\[Version]\user.config

this with the _Url_[some_hash] is pretty ugly, how can I remove it?


Solution

  • see more info here http://msdn.microsoft.com/en-us/library/aa730869%28v=vs.80%29.aspx