Victor's Blog

Live as if you were to die tomorrow. Learn as if you were to live forever

NAVIGATION - SEARCH

Troubleshoot warning - "Found conflicts between different versions of the same dependent assembly"

In my last post I said I had issues when Nuget auto updated my nuget packages to the latest version. One of those is that I received a lot of warnings after the compilation - "warning MSB3247: Found conflicts between different versions of the same dependent assembly." But the compile result didn't tell me which dll caused issue and the correct version.  Here is how I fix these:

Change the "MSBuild project build output verbosity" to "Detailed" or above. To do this, follow these steps:

  1. Bring up the Options dialog (Tools -> Options...).
  2. 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.
  3. In the tools/options page that appears, set the MSBuild project build output verbosity level to Detailed (assuming you're on VS2010; Normal will suffice in VS2008 or older).

Build the project and look in the output window. You should be able to find message like this
"There was a conflict between "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" and "System.Core, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes"."

Now you know which dll caused the warning and which version is correct. Update your project reference and recompile your project. The warning message should be removed.

Note: Please do not forget to change your build output verbosity level back to minimal once you fix all your warning.

blog comments powered by Disqus