Could not resolve assembly ‘Name’

I configured a windows service using .net 6.0 to run hangfire. But when running the service the dashboards in the recurring jobs display “Could not resolve assembly ‘Name’” and in the succeeded Jobs once the job completes “Can not find the target method.”. While debugging the code I can see that my execution is being hit, but when I publish the project and run it the job does not process the data.

I actually have a windows service which runs a hangfire job to run 3 recurring jobs, but when it’s build is deployed on production server and ran, the hangfire dashboard displays following error for all 3 recurring jobs:

System.InvalidOperationException: Recurring job can't be scheduled, see inner exception for details.
 ---> Hangfire.Common.JobLoadException: Could not load the job. See inner exception for the details.
 ---> System.IO.FileNotFoundException: Could not resolve assembly 'ProjExchange.HangfireProj.MyJobName'.

Weird thing is if I try to manually trigger any of the jobs then that particular job runs successfully, only when it is made to run on its own, it throws this error.
I also checked the bin folder for the dll file of MyJobName and it’s present there.
What can be the possible issue here?

You’ll see this if the project which hosts the dashboard does not have a reference to the assemblies in which the background jobs are defined. It’s not an execution error. It’s just a… pretty print?.. error, in that the dashboard is trying to use reflection to build up a display value for the job, but can’t because the assemblies aren’t present in the dashboard host project.

Or, more simply, you can safely ignore these errors, unless you really want to see a clean “report” of the job. If that’s the case, the dashboard host needs to reference the same assemblies as the background server host, or you need to create dummy assemblies for the dashboard to reference (I don’t recommend that route).