Vanishing application config file problem with VS 2003

J

Jeff

I recently installed the VS 2003 upgrade and a problem
showed up (related or not) where the windows form
application configuration file
(ApplicationName.exe.config) is deleted during the
application startup. The file is present in the
executable directory and after startup it is gone. If I
make the file read-only then it persists, but otherwise
it disappears. As a test I created a simple application
with no references. I can put a a breakpoint at the first
line and the config file is deleted before the first
executable line. Any pointers or ideas would be very
much appreciated.
 
H

Herfried K. Wagner [MVP]

* "Jeff said:
I recently installed the VS 2003 upgrade and a problem
showed up (related or not) where the windows form
application configuration file
(ApplicationName.exe.config) is deleted during the
application startup. The file is present in the
executable directory and after startup it is gone. If I
make the file read-only then it persists, but otherwise
it disappears. As a test I created a simple application
with no references. I can put a a breakpoint at the first
line and the config file is deleted before the first
executable line. Any pointers or ideas would be very
much appreciated.

Rename the file to "App.config", put it in the project's source
directory, add it to the project. VS.NET will copy it to the "bin"
folder automatically.
 
G

Guest

Thanks! That did it.

Is this new behavior in VS 2003? For better or worse
I've been maintaining slightly different configuration
files in the debug and release directories. I use the
debug version locally and the release contains the
customer version which I will now be naming something
else, I suppose.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top