log4net error in NuGet package for Combres 2.2.2.0

Dec 30, 2011 at 7:45 PM
Edited Dec 30, 2011 at 7:46 PM

Output:

PM> Install-Package combres
Attempting to resolve dependency 'fasterflect (≥ 2.0.1)'.
Attempting to resolve dependency 'log4net (≥ 1.2.10)'.
Attempting to resolve dependency 'dotless (≥ 1.2.0.0)'.
Attempting to resolve dependency 'YUICompressor.NET (≥ 1.5.0.0)'.
Attempting to resolve dependency 'AjaxMin (≥ 4.19.4141.18463)'.
Attempting to resolve dependency 'WebActivator (≥ 1.4.1)'.
Attempting to resolve dependency 'Microsoft.Web.Infrastructure (≥ 1.0.0.0)'.
Successfully installed 'fasterflect 2.0.1'.
Successfully installed 'log4net 1.2.11'.
Successfully installed 'dotless 1.2.1.0'.
Successfully installed 'YUICompressor.NET 1.5.0.0'.
Successfully installed 'AjaxMin 4.19.4141.18463'.
Successfully installed 'combres 2.2.2.0'.
Successfully added 'fasterflect 2.0.1' to ###.
Successfully added 'log4net 1.2.11' to ###.
Successfully added 'dotless 1.2.1.0' to ###.
Successfully added 'YUICompressor.NET 1.5.0.0' to ###.
Successfully added 'AjaxMin 4.19.4141.18463' to ###.
Successfully added 'combres 2.2.2.0' to ###.

If you look at the 2nd line "Attempting to resolve dependency 'log4net (≥ 1.2.10)'."
If you look at the 9th line "Successfully installed 'log4net 1.2.11'."


When the application runs, which was working perfectly prior to upgrading the package, I get a run time error:

Server Error in '/' Application.

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 41: 
Line 42:             ' Register the Combres route
Line 43:             RouteTable.Routes.AddCombresRoute("Combres")
Line 44: 
Line 45:         End Sub
Something INSIDE of Combres is still referencing the 1.2.10.0 version of log4net, but the installed version with the package is 1.2.11

Anyone have any ideas? This is a critical app and I need to fix it asap.

Thanks in advance.
Jan 3, 2012 at 5:38 PM

This appears to be an issue with the new version of log4net.dll, version 1.2.11.0

Manually reverting back to the previous version, 1.2.10.0, resolves the issue.

Coordinator
Jan 4, 2012 at 4:43 AM

There's a bug in the Combres' Nuget spec which doesn't enforce an exact version of log4net.  I've fixed it and updated the Combres' Nuget package (v 2.2.2.2).

Jan 4, 2012 at 12:33 PM

Outstanding!!

Will be testing the update this morning.

Jan 4, 2012 at 1:22 PM
buunguyen wrote:

There's a bug in the Combres' Nuget spec which doesn't enforce an exact version of log4net.  I've fixed it and updated the Combres' Nuget package (v 2.2.2.2).

Be aware that you CANNOT upgrade dependency packages with this fix. This includes the following:

1.) dotless

2.) WebActivator

3.) YUICompressor.NET

Attempting to upgrade those packages will result in an error:

"Error: Updating 'dotless 1.2.0.0' to 'dotless 1.2.1.0' failed. Unable to find a version of 'combres' that is compatible with 'dotless 1.2.1.0'."

You'll get the same error on any of the dependency packages above when attempting to upgrade.

Jan 19, 2012 at 9:28 AM

Hi,

If you are still having bother you may wish to have a look at my answer on stackoverflow and see if it helps you out with the log4net public key change issue. 

http://stackoverflow.com/questions/8743992/how-do-i-work-around-log4net-keeping-changing-publickeytoken/8806628#8806628

Kind regards,

DC

Feb 15, 2012 at 8:13 AM

Hi buunguyen, can you please fix the Combres NuGet Dependencies ?

I really want to use the latest version from log4net and other dependent dll's

Coordinator
Apr 27, 2012 at 1:52 AM

I've just pushed the latest Nuget package with Combres linking latest versions of libraries. Hope it addresses everyone's issue.

Apr 27, 2012 at 1:12 PM

buunguyen,

Everything worked fine after the update. Thanks for updating this package!!

Just a note, log4net has an update out for version 2.0 (Elmah is using 1.2.11).  :)

May 29, 2012 at 9:19 PM

What a mess. Can we please have the log4net nuget package requirement set to >= 1.2.11 instead of hard-coding to 1.2.11? Some other packages are using 2.0, and while I could try to resolve this manually, it kinda defeats the purpose of using NuGet. :)

Nov 14, 2012 at 6:54 PM
nicholashead8485 wrote:

What a mess. Can we please have the log4net nuget package requirement set to >= 1.2.11 instead of hard-coding to 1.2.11? Some other packages are using 2.0, and while I could try to resolve this manually, it kinda defeats the purpose of using NuGet. :)

Any news on this one?
It's been a long time since that issue, And I just tried to update my log4net to version 2.0.0. and it still has that issue.

Install-Package : Updating 'log4net 1.2.11' to 'log4net 2.0.0' failed. Unable to find a version of 'combres' that is compatible with 'log4net 2.0.0'. 

Nov 29, 2012 at 8:26 AM

 

I have exactly the same issue with the version 2.2.2.6 of Combres...

Coordinator
Dec 7, 2012 at 4:57 PM

I've pushed version 2.2.2.7 which is built with log4net 1.2.11 (2.0) and dotless 1.3.1.  Please download, give it a try and let me know if everything's ok.  Thanks.

Coordinator
Dec 7, 2012 at 4:58 PM

Note that Combres.Log4Net is now a separate dependency, so if you want logging, you will need to install it separately.  Combres is now free from log4net, so that those who don't need logging won't be bothered again with unnecessary dependency.