Connecting Tech Pros Worldwide Forums | Help | Site Map

Winforms Configuration Files in 1.1

Mark Phillips
Guest
 
Posts: n/a
#1: Jul 19 '05
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

Jay B. Harlow [MVP - Outlook]
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Winforms Configuration Files in 1.1


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

"Mark Phillips" <mg.phillips@verizon.net> wrote in message
news:014001c356ba$e8154640$a401280a@phx.gbl...[color=blue]
> 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[/color]


Closed Thread