I’ll make refresh for this question as there are no progress for 3 years and we’re thinking about swithching to Quartz.NET.
Our problem described on this schema:
Our main process has some plugins, that cat put their own job into “DEFAULT” queue. It is supposed that default queue should be processed with main process with plugins loaded into it.
We also have secondary server for heavy reporting jobs and email sending. This server is configured for separate queue “EMAIL”.
But unexpected thing here that this secondary server tries by some reason to deserialize plugin job from DEFAULT queue and off course crashes with:
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 load file or assembly "Plugin1, PublicKeyToken=null" or one of its dependencies. The system cannot find the file specified.
в System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
в System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
в System.Reflection.Assembly.Load(AssemblyName assemblyRef)
в Hangfire.Common.TypeHelper.AssemblyResolver(String assemblyString)
в System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
в System.TypeNameParser.ResolveAssembly(String asmName, Func`2 assemblyResolver, Boolean throwOnError, StackCrawlMark& stackMark)
в System.TypeNameParser.ConstructType(Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
в System.TypeNameParser.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark)
в System.Type.GetType(String typeName, Func`2 assemblyResolver, Func`4 typeResolver, Boolean throwOnError)
в Hangfire.Common.TypeHelper.DefaultTypeResolver(String typeName)
в Hangfire.Storage.InvocationData.DeserializeJob()