C# – Annoying log4net assemly reference issue in vs 2012

clog4netnetvisual studio 2012

Getting following build error.

Error 15 Unknown build error, 'Could not load file or assembly
'log4net, Version=1.2.11.0, Culture=neutral,
PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The
located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040)'

I dont quite get whats going on.
I tried using GUI for references, it didn't help. Spent 1.5 hours on this already and issue is still present.

I go directly to project file now and the only reference to log4net there is the following:

<Reference Include="log4net, Version=1.2.12.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\..\ExternalDlls\.NET 4.0\log4net.dll</HintPath>
</Reference>

I still get this error. Why does it even mention V1.2.11?

Thanks in advance

Best Answer

Okay got build working finally.

I went through all other projects and did Resharper - Remove unused references action.

After it was done, project started to build.