logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter A. Kirk" ...@alpha-solutions.dk>
Subject RE: Different versions
Date Tue, 02 May 2006 12:36:30 GMT
I have gotten it to work now. It seems that the order of sections in the
web.config is important. At least if I put my configuration (including
log4net configuration) before the configuration for the cms, then I can
get my logging to work.

Thanks for the help,
Peter

> -----Original Message-----
> From: Peter A. Kirk [mailto:pk@alpha-solutions.dk]
> Sent: 2. maj 2006 13:33
> To: Log4NET User
> Subject: RE: Different versions
> 
> Hi again
> 
> Thanks for the info. This actually seems to work (sort of). I added
the
> newer version of log4net (1.2.9.0) to the GAC, and added the binding
> redirect to web.config.
> 
> Now my app can start, and web pages are shown via the cms.
> 
> BUT, no logging occurs. I use exactly the same <log4net> configuration
> as I use when I test run my app separately from the cms, but for some
> reason when I include the configuration in the main cms's web.config
> then no logging occurs...
> 
> 
> Peter
> 
> > -----Original Message-----
> > From: Ron Grabowski [mailto:rongrabowski@yahoo.com]
> > Sent: 1. maj 2006 22:49
> > To: Log4NET User
> > Subject: RE: Different versions
> >
> > Have you tried a bindingRedirect in your app.config file? The
snippet
> > of code in this post:
> >
> > http://tinyurl.com/nvsg8
> >
>
http://forum.springframework.net/viewtopic.php?p=2016&sid=0090338a031a5e
> 71
> > 572702479c9dc3c2#2016
> >
> > gives an example of a bindingRedirect for log4net 1.2.0 beta 8 to
> > log4net 1.2.9 beta:
> >
> > <runtime>
> >  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
> >   <dependentAssembly>
> >    <assemblyIdentity name="log4net"
publicKeyToken="b32731d11ce58905"
> > culture="neutral" />
> >     <bindingRedirect oldVersion="1.2.0.30714" newVersion="1.2.9.0"
/>
> >    </dependentAssembly>
> >  </assemblyBinding>
> > </runtime>
> >
> > --- "Peter A. Kirk" <pk@alpha-solutions.dk> wrote:
> >
> > > Hi, thanks for the reply.
> > >
> > > Actually I do not have control over the things which use log4net.
> > >
> > > My application is installed in the CMS which uses an older version
> of
> > > log4net. My application also uses a "framework" which is built
> > > against a
> > > newer version of log4net. These versions of log4net clash which
> > > appears
> > > to mean that the cms and the framework cannot coexist - because of
a
> > > 3rd
> > > dll!
> > >
> > >
> > > Peter
> > >
> > >
> > > > -----Original Message-----
> > > > From: Hart, Aaron [mailto:ahart@zolldata.com]
> > > > Sent: 1. maj 2006 17:03
> > > > To: Log4NET User
> > > > Subject: RE: Different versions
> > > >
> > > > Since the two applications are built against two different
> versions
> > > of
> > > > log4net, the only way to run them both is to put both (or at
least
> > > one?)
> > > > in the Global Assembly Cache, which requires you to strong name
> one
> > > of
> > > > them. It sounds like all you have control over is the newer
> > > version,
> > > so
> > > > try strong naming it and putting it in the GAC and leaving the
> > > cms's
> > > > version in place.
> > > >
> > > > Aaron
> > > >
> > > > -----Original Message-----
> > > > From: Peter A. Kirk [mailto:pk@alpha-solutions.dk]
> > > > Sent: Monday, May 01, 2006 4:53 AM
> > > > To: Log4NET User
> > > > Subject: Different versions
> > > >
> > > > Hi
> > > >
> > > > This isn't really an issue about log4net, but two programs which
> > > use
> > > > log4net, but I hope someone can offer some advice.
> > > >
> > > > I have some classes which use log4net (ver 1.2.9.0). These
classes
> > > run
> > > > inside a cms-framework - which apparently also uses log4net
> > > internally,
> > > > but
> > > > version 1.2.0.3. This causes problems with my classes - I get an
> > > error
> > > > like:
> > > > Could not load file or assembly log4net, version=1.2.9.0,
> > > culture=...
> > > > The
> > > > located assembly's manifest definition does not match the
assemply
> > > > reference. (exception from HRESULT: 0x80131040).
> > > >
> > > > If I replace the cms's version of log4net.dll with the one I
use,
> > > then
> > > > the
> > > > cms complains (same sort of error as above but with different
dll
> > > > version).
> > > >
> > > > How can I get the cms and my classes to use their own versions
of
> > > > log4net.dll?
> > > >
> > > >
> > > > Thanks,
> > > > Peter
> > >


Mime
View raw message