Jeffrey Palermo (.com)

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
When the only thing that will work is gacutil - level 200
I try to avoid the GAC at all costs.  I prefer xcopy deployments of applications.  However, if you use some projects that all reference log4net, then you know the pain of trying to resolve log4net versions.  More often than not, it's not feasible to recompile every project you depend on.  If you need to reference two libraries that each then reference different versions of log4net, you have a tough problem because only one file named "log4net.dll" can be copied to the /bin directory.

log4net is a strong-named assembly, so version information is a part of finding the assembly.  In this case, I had to resort to putting two versions in the GAC.  As much as I hated doing so, it seemed like the only way out.

gacutil /i log4net.dll (x2)


Posted Sun, May 28 2006 4:27 PM by Jeffrey Palermo
Filed under:

[Advertisement]

Comments

Tomas Restrepo wrote re: When the only thing that will work is gacutil - level 200
on Sun, May 28 2006 10:19 PM
Were the two log4net versions so different that you couldn't do a binding redirect and have a single version of it?
Jason Haley wrote Interesting Finds: May 29, 2006 AM edition
on Mon, May 29 2006 10:24 AM
Jeffrey Palermo wrote re: When the only thing that will work is gacutil - level 200
on Mon, May 29 2006 10:01 PM
Tomas,
To be honest, I didn't try a binding redirect.  I will give that a shot.
Harris wrote re: When the only thing that will work is gacutil - level 200
on Tue, Jun 6 2006 8:22 AM
Jeffrey,

I experienced a similar problem with a third-party web control.  All things aside, we resorted to adding a binding redirect so that the application would load the new version of the component without having to recompile the application.  Worked like a champ.

H
Jeffrey Palermo wrote re: When the only thing that will work is gacutil - level 200
on Tue, Jun 6 2006 8:35 AM
Harris,
That's great to hear.