gpt4 book ai didi

c# - Quartz : Quartz. 找不到 XmlSerializers 中的奇怪错误

转载 作者:行者123 更新时间:2023-11-30 15:02:18 24 4
gpt4 key购买 nike

我在 Quartz.net 中收到以下错误

The assembly with display name 'Quartz.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Quartz.XmlSerializers, Version=2.0.1.100, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

这很奇怪,因为 Quartz.XmlSerializers 在我使用的任何代码中都不存在。它不在 Quartz 源代码、我的代码中,而且我能说的最好的依赖项都没有。它只在我调试我的项目时出现,但在我下载 Quartz 2.0.1 源代码并从那里运行服务器时不会出现。

我正在使用 topshelf 作为服务安装库。

它发生在 Quartz 源的 XMLSchedulingDataProcessor.cs 的第 226 行的反序列化过程中。

// deserialize as object model
System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(typeof(QuartzXmlConfiguration20));

解决这个问题的任何线索都会有所帮助,因为我被这个错误难住了。

最佳答案

在使用 XmlSerialization 的应用程序中,当应用程序查找缓存的序列化程序集时,您可以在外部代码中获得第一次机会异常。您可以在 this question 中找到更多信息.

关于c# - Quartz : Quartz. 找不到 XmlSerializers 中的奇怪错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12862374/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com