Nous utilisons les blocs d'application de mise en cache et de journalisation d'entlib 4.1. Nous voulons garder la configuration de ces deux fichiers dans des fichiers séparés. Comment pouvons-nous y parvenir?Sources de configuration multiples pour Enterprise Library 4.1?
Il semble que entlib utilise toujours la source sélectionnée comme configuration.
J'ai essayé les éléments suivants:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9057346a2b2dcfc8" />
</configSections>
<enterpriseLibrary.ConfigurationSource selectedSource="messagesCache">
<sources>
<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" />
<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" />
</sources>
</enterpriseLibrary.ConfigurationSource>
</configuration>
Mais cela ne fonctionne pas parce que les blocs d'application utilisent toujours la valeur de l'attribut selectedSource.
*** section d'exécution *** problèmes avec ** configSource ** – Kiquenet