Problems with System.Configuration.IConfigurationSectionHandler in combination with GAC

  • Thread starter Thread starter Thomas Koch
  • Start date Start date
T

Thomas Koch

Hi there - I am implementing a custom
System.Configuration.IConfigurationSectionHandler to enable a custom
configuration setting in the application config file. This
IConfigurationSectionHandler is included in a signed dll.

Now, an exe application using my dll can also use this custom configuration
setting simply be including a reference to it in the <configSection> part of
the .config

This works very well when I am placing the dll in the same directory as the
exe file. However, when I try to use the version of my dll registered in the
GAC it stops working. It generates a
System.Configuration.ConfigurationException complaining about being unable
to locate my implementation of IConfigurationSectionHandler.

Any help would be greatly appreciated.

Kind Regards
Thomas Koch
Kapow Technologies
 
Okay fixed it - the answer was to fully qualify the name of the assembly
containing the section handler implementation.

In retrospect this seems obvious. What tricked me was that everything was
working, using the abbreviated version of the assembly name (without version
etc.), as long as the assembly was located next to the exe file.

Thomas Koch
Kapow Technologies
 
Back
Top