简体   繁体   中英

where is user.config?

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.

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.

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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM