Context
I have two application in place, one is my main enterprise application and in other I have hangfire (hangfire server, client and dashboard) hosted. My main application also use hangfire for some long task and executes them asynchronously. Both using the same DB for HF storage. And there is only one HF server.
Issue
I am getting the following errors intermittently -
"Can not change the state to 'Processing': target method was not found." OR
"Can not change the state to 'Enqueued': target method was not found."
with following details -
System.IO.FileNotFoundException
Could not load file or assembly 'MyApp.Hangfire, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
where MyApp.Hangfire is my hangfire application executing jobs. And I am sure that it is there, and even some successful jobs affirms it.
Please find the attached screenshot for more details.
Observation
The issue is not consistent, the job not always fails, sometimes it fails, re queued and get passed and sometimes when it is out of retries it even fails. As shown in screenshot