SharePoint On-premises Event Receiver: Assembly redirect without modifying web.config

24 Views Asked by At

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?

  1. 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.
  2. I have tried to add this for auto-deployment in Visual Studio project but it does not allow two assemblies with same name.
  3. My initial attempts at using AppDomain.CurrentDomain.AssemblyResolve did not work, but I need to try this further if that's the only way.
0

There are 0 best solutions below