tags:

views:

74

answers:

3

I've been experimenting with the project settings feature of C# projects, and I'd like to find the xml file containing all the user settings. It should be in my App Data folder in Documents and Settings, but from there I can't seem to find it.

Where does this file get saved?

Edit:
I am using Windows XP and have Show Hidden files turned on and Hide OS files turned off.

Based on http://stackoverflow.com/questions/621265, it looks like it should be stored at:

%AppData%\[CompanyName]\[ExeName]_Url_[some_hash]\[Version]\

I've checked in All Users/Application Data and in my username/Application Data, but can't see anything. I also don't know where CompanyName and ExeName are being populated from--I'm just running the project through the VS debugger.

A: 

Settings are usually stored in the same directory as your application.

The name of the file is the same as the assembly, with .config added to it. If the assembly name is test.exe the settings will be stored in test.exe.config

Brad Bruce
I think he is talking about Settings not App.Config. If so, it's located in the OS directory for App Data.
kenny
+1  A: 

I suspect the directory is there, but hidden. Are you using Win7?

details on XP:

C:\>dir "\Documents and Settings\All Users"
 Volume in drive C has no label.
 Volume Serial Number is 805B-45EC

 Directory of C:\Documents and Settings\All Users

05/28/2010  05:34 AM    <DIR>          .
05/28/2010  05:34 AM    <DIR>          ..
09/29/2010  05:30 PM    <DIR>          Desktop
05/28/2010  05:32 AM    <DIR>          Documents
05/28/2010  01:24 AM    <DIR>          Favorites
05/28/2010  01:32 PM    <DIR>          Start Menu
               0 File(s)              0 bytes
               6 Dir(s)  29,000,216,576 bytes free

C:\>dir "\Documents and Settings\All Users\Application Data"
 Volume in drive C has no label.
 Volume Serial Number is 805B-45EC

 Directory of C:\Documents and Settings\All Users\Application Data

09/03/2010  10:17 AM    <DIR>          Sun
05/28/2010  05:55 AM    <DIR>          VMware
05/28/2010  12:39 PM    <DIR>          Windows Genuine Advantage
               0 File(s)              0 bytes
               3 Dir(s)  29,000,216,576 bytes free
kenny
+1  A: 

Thanks for all of your comments. I ended up searching for a known string that should have been in settings file, and was able to find it that way(thanks to @aqwert). The path turned out to be:

C:\Documents and Settings\[myusername]\**Local Settings**\Application Data
  \[MyProjectName]\[MyProjectName].vshost.[random characters]\1.0.0.0\user.config

The problem was that I wasn't looking inside the Local Settings folder. I had another Application Data folder inside my user folder just like Kenny did in his post.

Slider345