App.config settings not available for user controls at design time
vs2005:
I am finding that the app.config settings are not being read by user
controls on a form at design time. The designer can't load in this case
and throws up it's error message. There are a few other threads on this
but none seem to have an answer. For example:
http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/74039dbbe18e0e79/4a4b69799a7ff0d8?lnk=st&q=&rnum=23&hl=en#4a4b69799a7ff0d8
It's very annoying. At run time the program is ok, the settings are
read. Is there a fix for this? The only thing I can do now is test for
DesignMode in the user control and skip certain lines of code.
Date:Mon, 02 Jul 2007 05:34:26 -0600
Author:
|
Re: App.config settings not available for user controls at design
time
Paul wrote:
> vs2005:
>
> I am finding that the app.config settings are not being read by user
> controls on a form at design time. The designer can't load in this case
> and throws up it's error message. There are a few other threads on this
> but none seem to have an answer. For example:
>
> http://groups.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/74039dbbe18e0e79/4a4b69799a7ff0d8?lnk=st&q=&rnum=23&hl=en#4a4b69799a7ff0d8
>
>
>
> It's very annoying. At run time the program is ok, the settings are
> read. Is there a fix for this? The only thing I can do now is test for
> DesignMode in the user control and skip certain lines of code.
I am wrong. It appears that OnLoad is only called for usercontrols when
using the forms designer, not for the main form? App.config settings are
not available in the designer period, AFAIK. I need a good backgrounder
on the details for this.
Date:Tue, 03 Jul 2007 11:16:26 -0600
Author:
|