c# - No Way to Resolve Conflict Between dlls -


i'm getting wall of warnings similar following in build:

no way resolve conflict between "newtonsoft.json, version=7.0.0.0"  , "newtonsoft.json, version=6.0.0.0".  choosing "newtonsoft.json, version=7.0.0.0" arbitrarily. 

i additional warnings following dlls (repeats intentional):

microsoft.owin system.web.http newtonsoft.json system.net.http.formatting microsoft.owin microsoft.applicationinsights 

as matching message each warning:

consider app.config remapping of assembly solve conflict , rid of warning. 

finally, conflict:

microsoft.common.currentversion.targets found conflicts between  different versions of same dependent assembly.  please set "autogeneratebindingredirects" property true  in project file. 

i've read every stack overflow , msdn answer find these messages. according this answer, best solution change references causing conflicted warnings reference same version. seems problem chain of assemblies coming of 53 projects in solution depend on different assemblies different versions. unable tell projects cause these warnings, , binding redirects (auto-generated in every single project, checked) have no effect on warnings.

what can resolve these build warnings?

they same warning , telling do. can either clean references in project. if using nuget, shouldn't of issue. go manage nuget packages. should see duplicate packages in list. move references older package new version of package. 1 way resolve conflicts.

the second way add binding redirects assemblies conflicted. here's example of json.net redirect.

  <runtime>     <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentassembly>         <assemblyidentity name="newtonsoft.json" publickeytoken="30ad4fe6b2a6aeed" />         <bindingredirect oldversion="0.0.0.0-6.0.0.0" newversion="7.0.0.0" />       </dependentassembly>     </assemblybinding>   </runtime> 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

delphi - Take screenshot in webcam using VFrames in Console Application -

extjs - Set tooltip on click event on the grid cell -