Dependent assembly version conflicts after upgrading

Bryan Drenner asked on January 12, 2015 21:09

Every time I upgrade our sites to the next version of Kentico, Visual Studio subsequently gives me mind-boggling warnings related to dependent assemblies. They typically read like this:

warning MSB3277: Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed.

More often than not, it relates to Newtonsoft.Json. Adding Web.config binding redirects usually doesn't fix the error. This time around, upgrading to 8.2, I had to exclude Kentico's bundled Newtonsoft.Json assembly (in the CMSDependencies folder) from the project altogether. I also had to change a reference, which was pointing to Kentico's bundled System.Net.Http assembly (also in the CMSDependencies folder), to instead use the standard GAC version.

From what I can tell, these changes don't affect the performance or reliability of the CMS, but I don't have time to QA the whole CMS.

Has anyone else had issues like this, and what did you do to resolve the conflicts?

Correct Answer

Mark Haraguchi answered on February 6, 2015 02:21

I figure you've probably already resolved this, but for anyone else who runs across it, here was the solution: link text

Essentially, you just have to close all of your editor windows in Visual Studio. A close & restart of Visual Studio won't even fix it.

Coincidentally, Bryan, I think we probably have very similar Kentico configurations because we have run across the same issues that you posted in a different post about having to create a "finisher" deploy for each upgrade version. So far, we're having problems with 8.2 even with a "finisher".

We also encountered the issues with System.Net.Http. We will try your solution because doesn't seem to build properly.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Juraj Ondrus answered on January 20, 2015 10:26

Hi Bryan,

Could you please let us know what is the source of this warning? What project? So I can provide you with more accurate answer? It is not standard to have this in GAC by default so the workaround you are using may not work all the time. Are you using web application or web site project?

Thank you!

Best regards,
Juraj Ondrus

0 votesVote for this answer Mark as a Correct answer

Bryan Drenner answered on February 17, 2015 17:11

Mark, thanks for reaching out. Each time this has happened to me, I've managed to resolve the problem by some combination of restarting Visual Studio, closing editor windows, cleaning the solution, etc. The problem has always unexpectedly vanished in a manner that left me uncertain as to how it was resolved. I appreciate the tip.

Juraj, I'll post more information the next time this happens.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.