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
 
Back
Top