If you are not using ConfigurationManager to manage your application and user settings, you should be. The configuration toolkit in the .NET Framework is remarkably well designed, and the Visual Studio tools that interact with it, too.
The default behavior of the ConfigurationManager sets both invariant (applications) and modifiable (user) settings in the right places: application settings are included in the application folder, and user settings go to System.Environment.SpecialFolder.LocalApplicationData . It works correctly on all versions of Windows that support .NET.
As for the log files, System.Environment.SpecialFolder.LocalApplicationData is usually the place you want to put as it is guaranteed to be written by the user.
Of course, there are times when you would not want to - for example, if you want to write files to a network resource so that you can easily access them remotely. There is a fairly wide range of ways to implement it, but most of them begin by creating an application parameter containing the path to the shared folder. All of them are related to administration.
I have several complaints about ConfigurationManager and VS-tools: there should be better documentation of a high level than there is, and better documentation of the VS Settings class. The mechanism by which the app.config file goes to the application configuration file in the target assembly directory is not transparent (and is the source of one of the most frequently asked questions: "what happened to my connection string?"). And if there is a way to create settings that do not have default values, I did not find it.
Robert Rossney Nov 06 '08 at 20:03 2008-11-06 20:03
source share