简体   繁体   English

Quartz.NET如何存储完全合格的程序集名称

[英]Quartz.NET how to store fully qualified assembly name

Quartz.NET is using the following for the job class name: Quartz.NET使用以下名称作为作业类名称:

ClassName, myAssembly

However, myAssembly.dll lives in the GAC, and so I get the following error when trying to run the job: 但是,myAssembly.dll位于GAC中,因此在尝试运行该作业时出现以下错误:

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. 我真的需要它使用完全限定的名称,因此它将从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? 有什么办法可以告诉Quartz.NET使用完整信息? I noticed in 'GetStorableJobTypeName' in StdAdoDelegate.cs that the version number etc. are trimmed off the name. 我在StdAdoDelegate.cs的'GetStorableJobTypeName'中注意到,版本号等被删减了名称。

Should I just create my own custom StdAdoDelegate and override that one function? 我应该只创建自己的自定义StdAdoDelegate并重写该功能吗? Not really sure what best practice is here. 不太确定这里有什么最佳实践。

If you truly want this, you should override the GetStorableJobTypeName as you have already discovered. 如果您确实希望这样做,则应该覆盖已经发现的GetStorableJobTypeName。 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. 如果没有其他问题,则每当您创建DLL的新版本时,绑定就会重定向。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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