Hello,
I am struggling to run Hangfire server after upgrading to Newtonsoft.Json 10.0.2. I will have to use this library as other components are depending on this version.
These are my project configurations.
ASP.Net Core with .Net Framework 4.7
HangFire.SqlServer 1.6.12
Hangfire.AspNetCore 1.6.12
System.IO.FileLoadException: Could not load file or assembly ‘Newtonsoft.Json, Version=4.5.0.0, 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)
File name: ‘Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’
at Hangfire.Common.JobHelper.ToJson(Object value)
at Hangfire.SqlServer.SqlServerConnection.<>c__DisplayClass14_0.b__0(DbConnection connection)
at Hangfire.SqlServer.SqlServerStorage.<>c__DisplayClass19_0.b__0(DbConnection connection)
at Hangfire.SqlServer.SqlServerStorage.UseConnection[T](Func2 func) at Hangfire.SqlServer.SqlServerStorage.UseConnection(Action
1 action)
at Hangfire.SqlServer.SqlServerConnection.AnnounceServer(String serverId, ServerContext context)
at Hangfire.Server.BackgroundProcessingServer.Hangfire.Server.IBackgroundProcess.Execute(BackgroundProcessContext context)
at Hangfire.Server.ServerProcessExtensions.Execute(IServerProcess process, BackgroundProcessContext context)
at Hangfire.Server.AutomaticRetryProcess.Execute(BackgroundProcessContext context)
Can someone help me to resolve this issue?