FileConfigurationSource with CAB QuickStart

Topics: CAB & Smart Client Software Factory
Apr 25, 2006 at 3:36 AM
originally posted by: eoco

Is there a way to use the FileConfigurationSource with CAB? This feature is built in to Ent Lib 2.0 and is implemented by modifying app.config as follows:

<configuration>
<configSections>
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
</configSections>
<enterpriseLibrary.ConfigurationSource selectedSource="FileConfigurationSource">
<sources>
<add name="FileConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
filePath="..\..\components.config" />
</sources>
</enterpriseLibrary.ConfigurationSource>
</configuration>

All configuration info then resides in components.config.

This is a followi up to a thread started in the Enterprise Library Core and Configuration message board: http://www.gotdotnet.com/codegallery/messageboard/thread.aspx?id=295a464a-6072-4e25-94e2-91be63527327&mbid=14115a85-ada3-4fef-b713-ea23215e982d&threadid=ff145a02-8511-4e30-acd5-bf522b91a46d