How handle version conflicts between third party library used in Orchard's modules versus same library used in custom module?

Topics: Customizing Orchard, General
May 1, 2015 at 3:32 PM
In our custom module we have a reference to Newtonsoft.Json v6.0. The same library is also referenced in Orchard\Orchard.Web and Orchard\Orchard.Specs\Hosting\Orchard.Web but with version 4.5.0.

Every so often when a call is made to some method in the library, we'll get a 'The located assembly's manifest definition does not match the assembly reference' exception.

What's the best and safest way to handle this? Should we
  • upgrade what's being used in Orchard modules?
  • downgrade what we're using in our custom module and use same dll that Orchard's using?