views:

115

answers:

2

in vb.net i am trying to save application settings but for USER but i cannot find the user.config file

when does this file get created?

i searched my entire hardrive. i also searched the entire project.

+2  A: 

The user.config file is typically stored in their profile directory under the following structure:

Profile Directory\Company Name\App Name_Evidence Type_Evidence Hash\Version\user.config

Have you checked there?

EDIT: Taken from the article to help cover ambiguity about the path descriptions:

Profile Directory - is either the roaming profile directory or the local one. Settings are stored by default in the local user.config file. To store a setting in the roaming user.config file, you need to mark the setting with the SettingsManageabilityAttribute with SettingsManageability set to Roaming.

Company Name - is typically the string specified by the AssemblyCompanyAttribute (with the caveat that the string is escaped and truncated as necessary, and if not specified on the assembly, we have a fallback procedure).

App Name - is typically the string specified by the AssemblyProductAttribute (same caveats as for company name).

Evidence Type and Evidence Hash - information derived from the app domain evidence to provide proper app domain and assembly isolation.

Version - typically the version specified in the AssemblyVersionAttribute. This is required to isolate different versions of the app deployed side by side.

Dillie-O
im sorry i dont understand where that is
I__
A user's profile directory is usually located at C:\Documents and Settings\<username> (XP) or C:\Users\<username> (Vista)
Michael Petrotta
+1  A: 

You don't need to know where it is (and it's different under XP and Vista)

All you need to do is

Settings.Default.Save();
Henk Holterman
it saves automatically anyway when the form is closed
I__
wow i guess it didnt save mine!! thanks so much
I__