Microsoft.Common.targets (1360): Found conflicts between different versions of the same dependent assembly

Problem

Warning : “Found conflicts between different versions of the same dependent assembly”

Not enough information

Solution – Method

The verbosity of builds may be changed in Visual Studio > Tools > Options > Projects and Solutions > Build and Run > MSBuild Project output verbosity. May need to go to at least detailed. Then use the output window to get more information.
The verbosity may also be changed in the VS-TFS build.

Then search in the Output for “conflict”, and underneath it states:

“References which depend on “… new version
“References which depend on “… old version

Make them match.

Solution – Binding Redirect

Optionally check-in the file containing the app.config.

If you double click on the warning then you may get a message:

“One or more dependent assemblies have version conflicts.
Do you want to fix these conflicts by adding binding redirect records in the app.config file?”

If you click OK, then use source code control to compare the app.config you will get a change in the newVersion setting

<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”EntityFramework” publicKeyToken=”B77A5C561934E089″ culture=”neutral” />
<bindingRedirect oldVersion=”0.0.0.0-4.4.0.0″ newVersion=”6.0.0.0″ />
</dependentAssembly>
</assemblyBinding>
</runtime>

This Post History

VS-TFS Build was reporting this error for a long time, but not indicating precisely which file was causing the problem

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (1360): Found conflicts between different versions of the same dependent assembly

Generally have found the problem to be on a project which references another project, where both projects use the same references. One may get out of sync with the project being built.

Found the problem difficult to find. Not entirely sure what the problem was:
The build server had a copy of version 9 of Microsoft.VisualBasic.PowerPacks.Vs in c:\Program Files\Common Files\Microsoft Shared\…
instead of version 10.0 listed in some projects.
I checked that version 10 was installed on the build server, then removed the version 9 from this pc.
Could have perhaps considered making the PowerPack reference copy local.

Also try working out any references listed in the problem project which are also used by referenced projects and include a reference to the problem project. I have found that where Visual Studio builds projects without the referenced project references, MSBuild seems to need them in the target project as well. This was not in fact the case in my resolution here.

Example solved 15-Mar-2011 was System.Windows.Forms.DataVisualization was version 3.5.0.0 in a user control. Upgraded all to 4.0.0.0.

See http://stackoverflow.com/questions/1871073/resolving-msb3247-found-conflicts-between-different-versions-of-the-same-depend

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: