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)
Harris,
That’s great to hear.
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
Tomas,
To be honest, I didn’t try a binding redirect. I will give that a shot.
Were the two log4net versions so different that you couldn’t do a binding redirect and have a single version of it?