Alex Rivera | Logout

WPF/C#: Where should I be saving user preferences files?

Asked 2008-12-28T14:51:36.630
56

What is the recommended location to save user preference files? Is there a recommended method for dealing with user preferences?

Currently I use the path returned from typeof(MyLibrary).Assembly.Location as a default location to store files generated or required by the application.

EDIT: I found two related/interesting questions:

EDIT #2: This is just a note for people like me who had never used settings before. Settings are pretty useful, but I had to do a whole bunch of digging to figure out what was going on (coming from the Python world, not something I am used too). Things got complicated as I wanted to save dictionaries and apparently they can't be serialized. Settings also seem to get stored in 3 different files depending on what you do. There is an app.config, user.config and a settings.setting file. So here are two more links that I found useful:

Edit
Report

1 Answer

1

the following seems to be the best option:

Application.UserAppDataPath
answered 2010-08-02T06:16:19.697

Your Answer