Partial Migration 2.0 --> 3.1

Topics: Logging Application Block
Sep 19, 2007 at 9:47 PM
I need to partially migrate an application with some assemblies using EL 2.0 Application Logging, and others using EL 3.1 logging.
This is possible according to the inline help: "an application that has multiple assemblies can refer to more than one version."
But complicated "Partial migration is supported, but it is somewhat complicated to implement; therefore, it is not recommended."

I have found no advice on how to acheive this, especially on how to make the *.config file and/or any examples.

Any suggestions, links, example configs etc would be much appreciated

Thanks
GB
Sep 20, 2007 at 12:30 PM
Hi GB,

I think the only way to make this work is to have two separate configuration files. The logging block relies heavily on the app's configuration file (unlike other blocks where you can provide an external configuration source to a factory), which makes it more difficult.

Is is possible to use the old assemblies in an isolated app domain with its own, EntLib 2.0 configuration file in your case?

Fernando
Sep 20, 2007 at 9:37 PM
Thank you & Good suggestion.
Unfortunately app domains would not work in this instance.
Is there any other way to allow a EL 3.1 logging assembly to call a EL 2.0 logging assembly?

Thanks
GB

Sep 20, 2007 at 11:20 PM
Hi,

Having some assemblies using the v2.0 Logging block and others using the 3.1 version is quite different from allowing a EL 3.1 logging assembly to call a EL 2.0 logging assembly, unless by "a EL 3.1 loggin assembly" you mean "an assembly with a reference to the 3.1 version of the Logging block".
Which one is your case?

Fernando




GB wrote:
Thank you & Good suggestion.
Unfortunately app domains would not work in this instance.
Is there any other way to allow a EL 3.1 logging assembly to call a EL 2.0 logging assembly?

Thanks
GB



Sep 21, 2007 at 8:28 AM
Thanks for the clarification request.

A web site, web service, and winform all depend upon assembly X which in turn depends upon Y.
Assembly X has a reference to EL 3.1 logging block.
Classes within X use EL Logging.
X references and depends upon Y.
Assembly Y has a reference to EL 2.0 logging block.
Classes within Y use EL logging.

GB


fsimonazzi wrote:
Hi,

Having some assemblies using the v2.0 Logging block and others using the 3.1 version is quite different from allowing a EL 3.1 logging assembly to call a EL 2.0 logging assembly, unless by "a EL 3.1 loggin assembly" you mean "an assembly with a reference to the 3.1 version of the Logging block".
Which one is your case?

Fernando




GB wrote:
Thank you & Good suggestion.
Unfortunately app domains would not work in this instance.
Is there any other way to allow a EL 3.1 logging assembly to call a EL 2.0 logging assembly?

Thanks
GB




Sep 21, 2007 at 12:24 PM
Hi,

The issue here is of course that there is a single configuration file, and it can only have one "loggingConfiguration" section, so you can't have SxS configuration.
You could try changing the logging section name for the v2 binaries to something like "loggingConfiguration20" (there is a constant in LoggingSettings.SectionName). It's crude, but it should work and I can't see alternatives if you can't spawn a new app domain.

Fernando