Running EntLib 4.1 and 5.0 on same machine

Topics: General discussion
Jul 11, 2011 at 10:08 PM

I am running the BizTalk ESB toolkit (4.1 configured in machine.config) and an Azure application (5.0 configured in app.config) on the same machine.

I get conflicts in my Azure app when I start up due to the ESB machine config overriding my Azure config, the Azure app fails with 4.1 to 5.0 casting failure on configuration access.

Is it possible to override the machine.config from the app.config to force that application to run the 5.0 dlls? I have tried giving the enterprise library section a unique name (enterpriseLibrary.CloudConfigurationSource instead of enterpriseLibrary.ConfigurationSource) but that doesn't appear to be making any difference due to what I suspect are defaults in the ent lib methods looking for enterpriseLibrary.ConfigurationSource.

My work around for the moment is to comment out the ESB config as I was only prototyping but I want to run the two side by side, note I am unable to change the ESB config due to it being closed source.

Regards

Nikolai Blackie

Jul 12, 2011 at 3:58 AM

Hi,

I believe you will ran issues like you have encountered when ESB is present but basically 4.1 and 5.0 can run fine on same machine. I'm afraid I cannot provide much details with this since it is more of ESB and I haven't personally worked with it. I'm just thinking that the future version of ESB (that will use Entlib 5.0) might solve this issue.

 

Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com

Jul 13, 2011 at 5:00 AM

I came across to this biztalk forum suggesting to add this code to the the machine config:

<enterpriseLibrary.ConfigurationSource selectedSource="Local Application Configuration Source">
  <sources>
   <add name="Local File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" filePath="C:\Temp\EntLib5Solution\EntLib5ConsoleApp\bin\Debug\EntLib5ConsoleApp.exe.config" />
    <add name="Local Application Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" filePath="YourApplication.exe.config" />
 </sources>
</enterpriseLibrary.ConfigurationSource>

Hope this helps.

 

Noel Angelo Bolasoc
Global Technologies and Solutions
Avanade, Inc.
entlib.support@avanade.com