title: Multiple Configuration Sources for Enterprise Library 4.1?
body: <p>We use the caching and logging application blocks from entlib 4.1. We want to keep the configuration of those two in seperate files. How can we achieve this?</p>
  
  <p>It looks like entlib is always using the selectedSource as it configuration.</p>
  
  <p>I tried the following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;    
  &lt;configuration&gt; 
    &lt;configSections&gt;    
      &lt;section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" /&gt;
  
    &lt;/configSections&gt;
  
    &lt;enterpriseLibrary.ConfigurationSource selectedSource="messagesCache"&gt;    
      &lt;sources&gt;    
        &lt;add name="messagesCache" filePath="Configuration\\messagesCache.config"  type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" /&gt;    
        &lt;add name="logging" filePath="Configuration\\logging.config"  type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" /&gt;    
      &lt;/sources&gt;
  
    &lt;/enterpriseLibrary.ConfigurationSource&gt;    
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But this doesn't work because the application blocks always use the selectedSource attribute value.</p>