logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Bickford" <pbickf...@human-computing.com>
Subject RE: Upgrading from beta to current version--assembly binder tries to use old version
Date Mon, 12 Dec 2011 18:39:25 GMT
Ah! Enlightenment dawns!

After some digging, it seems that the culprit was the old PayPal_Base.dll
(used on my site to process payments) which was binding to an ancient
version of Log4Net. Unfortunately, PayPal_Base.dll was binding to one whose
signature (b32731d11ce58905) was even different than the "old, strong"
log4Net  one. I guess somewhere in Log4Net's history, there's an "old old"
version kicking around with the b32731d11ce58905 token, or else PayPal
rolled their own version (?).

Tried upgrading Log4Net alongside a newer version of PayPal_Base.dll, but
unfortunately, PayPal also seems to have done a major rethink on their API,
and the work to get it running (and integrated with all our middleware)
looks significant. It sounds dumb, but is there some way to either
re-tokenize the newer Log4Net using the expected signature, or else bind
them both (using the GAC?) in a way which would let PayPal_base.dll see its
expected version, while letting me log errors using the new version of
Log4Net?

-Pete

Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Monday, December 12, 2011 4:15 AM
To: Log4NET User
Subject: Re: Upgrading from beta to current version--assembly binder tries
to use old version

On 2011-12-11, Peter Bickford wrote:

> I'm attempting to upgrade (at last!) the log4net install on my ASP.NET 
> (II7,
> 64 bit, Windows 2008) web site to log4net v1.2.11.0.

Good idea 8-)

> The web app was originally built with v1.2.0.30714. Unfortunately, 
> simply replacing the reference in my ASP.NET Bin directory results in 
> the error:

> Could not load file or assembly 'log4net, Version=1.2.0.30714, 
> Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its 
> dependencies. The located assembly's manifest definition does not 
> match the assembly reference. (Exception from HRESULT: 0x80131040)

Most likely one of the other DLLs in your BIN directory has ben built
against the older version of log4net and references it.  Unless you can
re-compile all DLLs against the newer version your best option is to use the
1.2.11 binary signed with the "old" strong name key.

Stefan



Mime
View raw message