If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Is the file actually named "app.exe.config"? It needs to be named [name of your program].exe.config, and it must be in the same directory as the executable. That is, if your prorgam is called MyProgram.exe, the config file must be MyProgram.exe.config, and must be in the same directory as MyProgram.exe.

AppSettings Does not work

I am running in debug mode in VS2003 and I do not see the app.exe.config being created in the bin\debug folder with the app.exe file. I started the app by pressing the F5 key and trap at the spot where I call the AppSettings["DBConnect"] code line. Then I looked in the bin\debug directory with explorer and the config file is not there.

AppSettings Does not work

OK. It looks like you add the config file to the released application directory which works for stand-alone files that are released. But how do you test the config file works from the debug mode of Visual Studio environment?

AppSettings Does not work

I did that too, but when I run the program, VS erases my config file from the folder and attempts to create its own file. If the name is myApp.exe.config in my list of classes, then NO FILE IS WRITTEN.

Anyway, I thank you for your help as I have taken much of your time and I quess I will use my work around that I described. I also should move on to VS 2005! Thanks again.

What if you don't have an app.config in your project? Note that I am not suggesting you do things my way -- letting VS manage the file sounds easier. I'm just explaining how I've always done it and thus why I didn't know about the automatic features of VS. Glad you got it figured out!