Hi guys. I started integrating Hangfire into our app and it seems like others before me I have also come across the issue with Hangfire.Core depending on Newtonsoft.Json 188.8.131.52 for some reason.
I get the error:
Could not load file or assembly ‘Newtonsoft.Json, Version=184.108.40.206, 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)
at Hangfire.Common.JobHelper.ToJson(Object value)
I naturally tried making sure I have an assembly redirect with:
But that doesn’t seem to be having any effect.
When I look at Hangfire.Core dependencies for .NET Framework 4.5 it says Newtonsoft.Json >= 5.0.1 but clearly that’s not the case as it’s looking for 220.127.116.11. In any case, I would expect the redirect SHOULD work, but for some reason is not. The configuration section doesn’t have a namespace so that can’t be the issue either.
Really running out of ideas and what’s causing this in the first place anyways… pls assist.