Does VS.Net delete my config file?

B

Bill Gregg

Has anyone seen this behavior?

I'm debugging a console application. I have created a
PROJECTNAME.exe.config file and placed this file in the \Bin\Debug
directory. If I make the file read only, the configuration settings are
read and I have no issues.

However, if the PROJECTNAME.exe.config file is not readonly, the file is
deleted before my first line of code is even executed and then my
application fails because it does not find the configuration info. Is
this a feature? I'm still in VS 2003.

Thanks,
Bill
 
H

Hans Kesting

Has anyone seen this behavior?
I'm debugging a console application. I have created a
PROJECTNAME.exe.config file and placed this file in the \Bin\Debug
directory. If I make the file read only, the configuration settings are
read and I have no issues.

However, if the PROJECTNAME.exe.config file is not readonly, the file is
deleted before my first line of code is even executed and then my
application fails because it does not find the configuration info. Is
this a feature? I'm still in VS 2003.

Thanks,
Bill

I think you should create an "app.config" file in your project root.
VS.Net will copy this to the bin\debug directory and rename it to
PROJECTNAME.exe.config

Hans Kesting
 

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