Resolving MSB3247 - Found conflicts between different versions of the same dependent assembly
Change the "MSBuild project build output verbosity" to "Detailed" or above. To do this, follow these steps:
- Bring up the Options dialog (Tools -> Options...).
- In the left-hand tree, select the Projects and Solutions node, and then select Build and Run.
- Note: if this node doesn't show up, make sure that the checkbox at the bottom of the dialog Show all settings is checked.
In the tools/options page that appears, set the MSBuild project build output verbosity level to the appropriate setting depending on your version:
- Diagnostics when on VS2012, VS2013 or VS2015 (the message in these versions says you should use "Detailed", but this is plain wrong, you should use "Diagnostics")
- Detailed when you're on VS2010
- Normal will suffice in VS2008 or older.
- Build the project and look in the output window.
Check out the MSBuild messages. The ResolveAssemblyReferences
task, which is the task from which MSB3247 originates, should help you debug this particular issue.
My specific case was an incorrect reference to SqlServerCe. See below. I had two projects referencing two different versions of SqlServerCe. I went to the project with the older version, removed the reference, then added the correct reference.
Target ResolveAssemblyReferences:
Consider app.config remapping of assembly "System.Data.SqlServerCe, ..."
from Version "3.5.1.0" [H:\...\Debug\System.Data.SqlServerCe.dll]
to Version "9.0.242.0" [C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PublicAssemblies\System.Data.SqlServerCe.dll]
to solve conflict and get rid of warning.
C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets :
warning MSB3247: Found conflicts between different versions of the same dependent assembly.
You do not have to open each assembly to determine the versions of referenced assemblies.
- You can check the Properties of each Reference.
- Open the project properties and check the versions of the References section.
- Open the projects with a Text Editor.
- Use .Net Reflector.
Mike Hadlow has posted a little console app called AsmSpy that rather nicely lists each assembly's references:
Reference: System.Net.Http.Formatting
4.0.0.0 by Shared.MessageStack
4.0.0.0 by System.Web.Http
Reference: System.Net.Http
2.0.0.0 by Shared.MessageStack
2.0.0.0 by System.Net.Http.Formatting
4.0.0.0 by System.Net.Http.WebRequest
2.0.0.0 by System.Web.Http.Common
2.0.0.0 by System.Web.Http
2.0.0.0 by System.Web.Http.WebHost
This is a much quicker way to get to the bottom of the warning MSB3247, than to depend on the MSBuild output.
Sometime @AMissico answer is not enough. In my case, I couldn't find the error in the Output windows so I decided to create a log file and analyze it, by doing the following steps:
Saving the build log to a file... https://msdn.microsoft.com/en-us/library/ms171470.aspx
msbuild MyProject.proj /fl /flp:logfile=MyProjectOutput.log;verbosity=detailed
Find the text:
warning MS...
or the specific warning info: (e.g. line 9293)Found conflicts between different versions...
and the full detail of the conflict error will be above of this message (e.g. line 9277)There was a conflicts between...
Visual Studio 2013