Adrie Kools

Adrie Kools

  • 1.7k
  • 27
  • 1.2k

Integration with different versions of third party component

Feb 1 2018 8:17 AM
We want to integrate a plugin with a com visible library that is built using Microsoft.net technologies.
 
In this plugin, several third party libraries are used, which themselves rely on different versions of other libraries. Among others Newtonsoft.Json.dll.
 
The issue we face is that this plugin requires as well version 9 and 10 of newtonsoft.json.dll. This is something that cannot be changed. Since only one version of a file can be placed in the install folder, version 9 can be replaced by 10 using a binding redirect specified in a config file.
 
To register the assembly for use with com, we use regasm. Based on MS documentation, this redirect has to be added using a regasm.exe.config file. However, this configuration seems not to be respected when called from our application.
 
Our main question is of course: do you have experience with this type of issue and what would be the recommended way to solve this?
 
We have tested the following possible options:add the missing library-versions to the GAC. This does work, but since the GAC is global for the system and the first place where the system looks for libraries, this could potentially influence other applications on the same machine.
 
For newtonsoft.json.dll this is highly discouraged because of issues in the past with assemblies with the sameness version number, containing different functionality.
 
This options is questionable.
 
Therefore we would really like input on how to deal with this issue.

Answers (2)