Could not load the job Could not load type from assembly

Error
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.TypeLoadException: Could not load type from assembly

I have 5 reoccurring jobs I need to setup, I had an older version of hangfire working, but it would get this message from time to time as well. We have since migrated this app to .net core 5, and have setup a new hangfire in the new project. see below for hangire configuration I’m specifying a queue for every once of the methods that are called by hangfire and the schema is dedicated to this queue. when we start the application all the reoccurring jobs throw this error and I have to gochoose and trigger the jobs and then they start working. It is sporadic though, one minute it will work and the next it will not.

Please help me resolve this issue…

My Setup

Startup.cs

ConfigureServices method:

services.AddHangfire(x => x
	.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
	.UseSimpleAssemblyNameTypeSerializer()
	.UseRecommendedSerializerSettings()
	.UseSqlServerStorage
	(
		Configuration.GetConnectionString("VMSConnection"), 
		new SqlServerStorageOptions { SchemaName = "HangFire2" }
	)
);

services.AddHangfireServer(options =>
{
	options.Queues = new[] { "datawarehouse" };
});

Configure method

app.UseHangfireDashboard();
CreateHangfireJobs();
public void CreateHangfireJobs()
{
	TimeZoneInfo tzinfo = TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time");

	RecurringJob.AddOrUpdate<RemindersService>("ReminderMonday", reminderSvc => reminderSvc.SendReminders("c7eb9460-18c7-4a3f-89c1-834a6f259efa", 0), Cron.Weekly(DayOfWeek.Monday, 17), tzinfo);            
	RecurringJob.AddOrUpdate<RemindersService>("ReminderFriday", reminderSvc => reminderSvc.SendFridayReminders("c7eb9460-18c7-4a3f-89c1-834a6f259efa"), Cron.Weekly(DayOfWeek.Friday, 9), tzinfo);
	RecurringJob.AddOrUpdate<RemindersService>("HourlyVisitCheck", reminderSvc => reminderSvc.UpcomingVisitCheck(), Cron.Hourly(5), tzinfo);
	RecurringJob.AddOrUpdate<RemindersService>("DailyEINUpdateNotification", reminderSvc => reminderSvc.SendEINEmailToVendors(), Cron.Daily(6, 0), tzinfo);
	RecurringJob.AddOrUpdate<RemindersService>("CHIPCheckin", reminderSvc => reminderSvc.UpcomingVisitCheckCHIP(), Cron.MinuteInterval(5), tzinfo);
	RecurringJob.AddOrUpdate<DataWarehouseRepo>("GetQualtricsSurveyResponse", datawarehouseSvc => datawarehouseSvc.GetQualtricsSurvyeResponse(), Cron.Minutely(), tzinfo);
}

Did you end up finding a solution for this?

HI @wunderkinder did you end up resolving this issue somehow ?