Support for Custom Configuration Section in EntLibConfig Tool

Topics: Building and extending application blocks, General discussion
Jan 1, 2013 at 7:01 PM

I am using Enterprise Library 5.0. One of my favorite things is the Configuration Tool that lets you use a GUI to edit your app/web.config files as opposed to editing them by hand. I am looking to have support for a Custom Configuration Section in the Configuration Tool. Is this possible? All my my searches return results about a custom configuration source and splitting your configuration into multiple files. That's not what I want. I want a single config file that looks something like this:

<?xml version="1.0"?>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
    <section name="RulesProcessing" type="CustomConfiguration.Configuration.RulesProcessingConfigurationSection, CustomConfiguration"/>
      <Rule name="Rule1" processAs="ExportToServer1" enabled="true" />
      <Rule name="Rule2" processAs="ExportToServer2" enabled="false" />
      <Rule name="Rule3" processAs="ExportToServer2" enabled="true" />
  <loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
    // Removed for brevity...

Is it possible to get Config Tool Support for a Custom Section? If so can someone point me to an example.

Jan 3, 2013 at 2:36 AM

Yes, it is possible to create your own application block along with config tool support.  There is an example in the Enterprise Library 5.0 - Extensibility Labs.

If you don't wish to create a full fledged application block you can just hook in to the UI Design aspects.

Randy Levy
Enterprise Library support engineer
Support How-to