Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Quartz.NET如何存储完全限定的程序集名称_C#_Vb.net_Scheduler_Quartz.net - Fatal编程技术网

C# Quartz.NET如何存储完全限定的程序集名称

C# Quartz.NET如何存储完全限定的程序集名称,c#,vb.net,scheduler,quartz.net,C#,Vb.net,Scheduler,Quartz.net,Quartz.NET正在使用以下作业类名称: ClassName, myAssembly 但是,myAssembly.dll位于GAC中,因此在尝试运行作业时出现以下错误: Could not load file or assembly 'myAssembly' or one of its dependencies. The system cannot find the file specified. 我真的需要它使用完全限定的名称,所以它将从GAC加载。例如 ClassName, myAs

Quartz.NET正在使用以下作业类名称:

ClassName, myAssembly
但是,myAssembly.dll位于GAC中,因此在尝试运行作业时出现以下错误:

Could not load file or assembly 'myAssembly' or one of its dependencies. The system cannot find the file specified.
我真的需要它使用完全限定的名称,所以它将从GAC加载。例如

ClassName, myAssembly, Version=1.2.3.4, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx
我能告诉Quartz.NET使用完整信息吗?我注意到在stdadoelegate.cs中的“GetStorableJobTypeName”中,版本号等从名称中删除


我是否应该创建自己的自定义stdadoelegate并重写该函数?不确定这里的最佳实践是什么。

如果您真的想要这样做,您应该覆盖GetStorableJobTypeName,正如您已经发现的那样。我强烈建议不要存储全名,因为这将导致大量问题。如果没有其他内容,则每当您创建新版本的DLL时,绑定都会重定向。

为什么要将其放入GAC?因为我们有数百个网站共享同一个DLL,如果DLL位于GACApart中,则更容易从DLL版本更改中升级它们,你知道我们还会遇到什么样的问题吗?实际上,我们有时需要能够升级DLL,所以我不能使用绑定重定向。我想我需要一些方法使其对版本更改具有鲁棒性,例如,如果版本更改(程序集无法加载),作业将被删除。好的,所以我想出了一个解决方法:在应用程序启动时,我使用正则表达式模式手动更新job_CLASS_NAME列中的DLL引用。