-
I have noticed strange behaviour which leads to I happens only with persistent store (checked on SQLServer and Microsoft-SQLite) and when Job class is in a separate assembly. With memory store everything works correctly. When job is defined inside asp.net project (where silkierquartz is hosted) also no problems. Only persistent store + external assembly. I use Quartz.Net 3.7.0 with SilkierQuartz 5.0.356 SilkierQuartz have a feature to auto discover jobs decorated with SilkierQuartzAttribute. The workaround is to call I understand that it might be SilkerQuartz related issue but I am curious if you could lead me to possible causes or perhaps it is a known issue with Quartz.Net The exceptrion from logs is as follows:
I have described my issue here and added a working example presenting the issue based on SilkierQuartz example project Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For posterity, but instead it should use
References: Regards, |
Beta Was this translation helpful? Give feedback.
For posterity,
I have found the solution. The issue was how assembly list was loaded that was passed to
services.AddSilkierQuartz
To create that list, I used a helper method that internally used
System.Reflection.Assembly.Load(assemblyName)
or
System.Reflection.Assembly.LoadFile(assemblyPath)
but instead it should use
System.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyName(assemblyName)
orSystem.Runtime.Loader.AssemblyLoadContext.Default.LoadFromAssemblyPath(assemblyPath)
.References:
About System.Runtime.Loader.AssemblyLoadContext
Regards,
Sebastian