简体   繁体   中英

Quartz.NET how to store fully qualified assembly name

Quartz.NET is using the following for the job class name:

ClassName, myAssembly

However, myAssembly.dll lives in the GAC, and so I get the following error when trying to run the job:

Could not load file or assembly 'myAssembly' or one of its dependencies. The system cannot find the file specified.

I really need it to use the fully qualified name, so it will load from the GAC. Eg

ClassName, myAssembly, Version=1.2.3.4, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx

Is there any way I can tell Quartz.NET to use the full info? I noticed in 'GetStorableJobTypeName' in StdAdoDelegate.cs that the version number etc. are trimmed off the name.

Should I just create my own custom StdAdoDelegate and override that one function? Not really sure what best practice is here.

If you truly want this, you should override the GetStorableJobTypeName as you have already discovered. I would strongly advice against storing the full name as this will lead to loads of problems. If nothing else, binding redirects whenever you create a new version of the DLL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM