We left Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Any way to treat and fix TypeLoadException?

Hello. We recently went trough a major refactor of our codebase and we changed a lot of classes namespaces and names. We know Hangfire depends on the assembly types to resolve dependencies and actually run the scheduled code. I was wondering if it is possible to easily treat these exceptions caused by this renaming and programaticaly ask hangfire to load a different assembly to run the code.

System.TypeLoadException: Could not load type 'MyService.Users.UserHandler' from assembly 'service, Version=0.1.682.0, Culture=neutral, PublicKeyToken=null'.

In the example above, we changed the class to MyService.Users.UserEntityHandler

You could recreate them with then updated type.

You could try UseTypeResolver on the global configuration. Introduced here: