Discussion:
App.config settings not available for user controls at design time
(too old to reply)
Paul
2007-07-02 11:34:26 UTC
Permalink
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.
Paul
2007-07-03 17:16:26 UTC
Permalink
Post by Paul
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
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.

Loading...