The blog has moved to a new address. The blog is now located at http://devintelligence.com

Friday, August 11, 2006

Where is the user.config file located in a non-Clickonce app?


The path of the user.config files is structured as follows:
<Profile Directory>\<Company Name>\<App Name>_<Evidence Type>_<Evidence Hash>\<Version>\user.config


Where:



  • <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.


Note: The file name is always simply 'user.config'




Technorati : , ,

1 comment:

Unknown said...

The "Profile Directory" referenced here for Windows XP is "Documents and Settings\[username]\Local Settings\Application Data" in case anyone is wondering.