Winforms Configuration Files in 1.1

  • Thread starter Thread starter Mark Phillips
  • Start date Start date
M

Mark Phillips

When I add a configuration file to a winforms application
the framework or vs is automatically deleting it. Result
is I always get null from
ConfigurationSettings.AppSettings property. I am placing
the file in the same folder as the exe (in this case the
debug folder) and using the "AppName.exe.config" naming
pattern. I am using VS2003, Architect.

Any solutions? Can't find this issue in knowledge base.

Thanks,
Mark
 
Mark,
Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET 2003. :-|

You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both 2002 & 2003) will copy the app.config file
from the project root to your output folder and name it appropriately
(myproject.exe.config).

Hope this helps
Jay
 

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

Back
Top