.net – warning MSB3276 – Found conflicts between different versions of the same dependent assembly

msbuildnetnuget

My solution consists of multiple projects and compiles fine. I'm using nuget and one of the packages that I use is log4net.2.0.0. I've recently updated the package to log4net.2.0.3 and made sure that in each project that belongs to the solution, the reference is updated. Unfortunately I'm still getting the following warning during the compilation process:

(ResolveAssemblyReferences target) -> C:\Program Files
(x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targe
ts(1635,5): warning MSB3276: Found conflicts between different
versions of the same dependent assembly. Please set the
"AutoGenerateBindingRedirects" property to true in the project file.
For more information, see http://go.microsoft.com
/fwlink/?LinkId=294190.

or a more elaborate version of this warning when compiling with /verbosity:detailed

Consider app.config remapping of assembly "log4net, Culture=neutral,
PublicKeyToken=669e0ddf0bb1aa2a" from Version "1.2.11.0" [] to Version
"1.2.13.0"
[Z:\xxx\packages\log4net.2.0.3\lib\net40-full\log4net.dll]
to solve conflict and get rid of warning. C:\Program Files
(x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1635,5):
warning MSB3276: Found conflicts between different versions of the
same dependent assembly. Please set the "AutoGenerateBindingRedirects"
property to true in the project file. For more information, see
http://go.microsoft.com/fwlink/?LinkId=294190.
[Z:\xxx\xxx\xxx\xxx.csproj]
AssemblyFoldersEx location:
"{Registry:Software\Microsoft.NETFramework,v4.5,AssemblyFoldersEx}"

I understand what it means, unfortunately I can't track down which project/library still references the old version of log4net. I understand that I can mask the warning just by simply remapping in app.config, but it seems like sweeping the problem under the rug rather than actually solving it properly.

What is the best way of tracking down where in my solution I have areference to the old version of log4net? I've tried all the obvious including searching through all the files for the version number. I also made sure that no other nupkgs have the dependencies set to this specific version of log4net.

Any help would be much appreciated.

Best Answer

Thanks to my dad and https://github.com/mikehadlow/AsmSpy I managed to find that:

Reference: log4net 1.2.11.0 by SuperSocket.SocketBase

Haha! Great handy tool!

Related Topic