I am trying to integrate Hangfire into an existing web service ( version .NET Framework 4.6.1 ) that already depends on Newtonsoft JSON 9.0.0 for itself and multiple other libraries. I have added a binding redirect in the web.config but this seems to have no effect on Hanfire using the newer version of Newtonsoft JSON.
Could not load file or assembly ‘Newtonsoft.Json,
Version=18.104.22.168, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or
one of its dependencies. The located assembly’s manifest definition does
not match the assembly reference. (Exception from HRESULT: 0x80131040)
<runtime xmlns=""> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-22.214.171.124" newVersion="126.96.36.199" /> </dependentAssembly> </assemblyBinding> </runtime> </runtime>
Does anyone have any idea how to force this newer version on Hangfire?