Question

I have noticed some strange behaviour on my system regarding the Global Assembly Cache (GAC). The assembly I'm interested in is log4net Version=1.2.11.0

The output of gacutil /l "log4net" is:

C:\Windows\system32>gacutil /l "log4net" Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.

The Global Assembly Cache contains the following assemblies:
log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL
log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL

Number of items = 2

However viewing the GAC through the explorer shell (before and after a restart) only shows one version:

enter image description here

This is compounded by the fact that my application cannot resolve the assembly, but works fine when I place it into the application base (bin folder). According to this article the GAC will be probed before the application base - which would point to the assembly not being in the GAC.

So is log4net Version=1.2.11.0 in the GAC? If so why can't my application locate it?

Was it helpful?

Solution

You are looking in the .NET 2.0 GAC, however, log4net v1.2.11.0 is a .NET 4 assembly. .NET 4 has its own GAC which is located in %winddir%\Microsoft.NET\Assembly. Check the GAC_MSIL directory in there and I'll bet you'll find it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top