Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net application settings path

Tags:

.net

settings

By default in windows application setting are saved in this directory:

%USERPROFILE%\Local Settings\Application Data\<Company Name>\<appdomainname>_<eid>_<hash>\<version>\user.config

Is it possible to change path for saving user.config file? For example save it in local folder?

like image 505
Anton Avatar asked Mar 21 '10 18:03

Anton


People also ask

Where are .NET application settings stored?

Settings. settings is located in the My Project folder for Visual Basic projects and in the Properties folder for Visual C# projects. The Project Designer then searches for other settings files in the project's root folder. Therefore, you should put your custom settings file there.

Where are C# application settings saved?

User settings are saved in a file within a subfolder of the user's local hidden application data folder.

Where is the application settings?

From the Home screen, tap the Apps icon (in the QuickTap Bar) > the Apps tab (if necessary) > Settings .


1 Answers

You can, if you make your own ApplicationSettingsBase derived class to manage the application settings.

For details, see Application Settings Architecture.

That being said, I strongly recommend not doing this. Using a local folder (local to your app) will require your application to run under elevated permissions on Vista and Windows 7, which is an unnecessary annoyance. User settings files should be configurable via your application, and not something the user ever needs to see or hand-edit...

like image 113
Reed Copsey Avatar answered Oct 13 '22 08:10

Reed Copsey