A .NET 3.5 solution ended up with this warning when compiling with msbuild.
Sometimes NDepend might help out but in this case it didn't give any further details. Like Bob I ended up having to resort to opening each assembly in ILDASM until I found the one that was referencing an older version of the dependant assembly.
I did try using MSBUILD from VS 2010 Beta 2 (as the Connect article indicated this was fixed in the next version of the CLR) but that didn't provide any more detail either (maybe fixed post Beta 2)
Is there a better (more automated) approach?
Change the "MSBuild project build output verbosity" to "Detailed" or above. To do this, follow these steps:
In the tools/options page that appears, set the MSBuild project build output verbosity level to the appropriate setting depending on your version:
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.
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
I found that (at least in Visual Studio 2010) you need to set the output verbosity to at least Detailed to be able to spot the problem.
It might be that my problem was a reference that was previously a GAC reference, but that was no longer the case after my machine's reinstall.
I had the same error and could not figure it out with the other answers. I found that we can "Consolidate" NuGet packages.
This warning generated for default ASP.NET MVC 4 beta see here
In, any cast this Warning can be eliminated by manually editing the .csproj file for your project.
modify........: Reference Include="System.Net.Http"
to read ......: Reference Include="System.Net.Http, Version=4.0.0.0"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With