Failed Can not change the state of a job to 'Enqueued': target method was not found

This is still happening on a regular basis:

System.InvalidOperationException: The type does not contain a method with signature `SendFromQueue(Int32)`

The execution would fail and then if I reschedule it and run it in Debug with set breakpoint the job would be executed, method would run and everything would work fine.

As we discussed privately, this exception was caused by different code bases that used the same storage. Job was scheduled correctly by the client, but server with different code base was unable to find the method.

This problem can be solved by using shared assembly with background jobs defined as interfaces (and different queues), or by using different storages for different environments (that is recommended).

I’m running into the same issue when I do BackgroundJob.Enqueue. Do you have an example of defining a background job as an email template?

I just changed a parameter in one of my methods and it hasn’t worked correctly since.