In a previous blog post I explored the solution recommended by Microsoft to resolve MSB3247 warnings, but it proved to be a little bit too tedious.
While converting the Lydia solution to .NET Standard instead of the plain old PCLs, I came again across the annoying compilation warning:
No Way to Resolve Conflict Between “Foo.Bar, Version=22.214.171.124” and “Foo.Bar, Version=126.96.36.199”…
My project was referencing version 188.8.131.52, but somehow one of the other references required version 184.108.40.206. I was clueless.
I considered inspecting manually every referenced assembly with Reflector to identify the culprit, but since I have several dozens of references, I decided that I needed a tool…
AsmSpy to the rescue
Once more, StackOverflow provided a solution
(note that this is the same question as the one I referred to in
my previous post).
Reading again the replies, I discovered AsmSpy, a tool written
by Mike Hadlow which does exactly what I needed: analyze all
assemblies found in a folder (such as
bin/Debug) and dump the
list of all references.
Here is a typical dump from
AsmSpy bin\Debug command:
Reference: Foo.Bar 220.127.116.11 by Shared.Blah 18.104.22.168 by Foo.Consumer
So the culprit was
Shared.Blah which was still referencing an old
Foo.Bar. Since I was the author of
could simply update it.
Otherwise, I would have had to define a
<bindingRedirect> as explained here.