I have SharePoint On-premises project that need to use a third party (DocuSign) assembly. Docusign refers to an older version of Newtonsoft json assembly and there are other assemblies that refer to newer versions. I want to redirect to newer versions of Newtonsoft but cannot modify web.config. In SharePoint project there is no assembly/config file where I can add the redirects.
Looks like I will have to handle this via AppDomain.CurrentDomain.AssemblyResolve. Is there a easier/better way to handle this?
- I am able to run the project by doing gacutil of older dll but I do not want to do this manual step on servers of my several customers.
- I have tried to add this for auto-deployment in Visual Studio project but it does not allow two assemblies with same name.
- My initial attempts at using AppDomain.CurrentDomain.AssemblyResolve did not work, but I need to try this further if that's the only way.