问题描述
我非常密切地遵循 Quartz.Net 的教程 上的说明,但我尝试调试我的项目时出现启动错误.
I'm following the directions on Quartz.Net's tutorial pretty closely, but I'm getting a start error when trying to debug my project.
The type initializer for 'Quartz.Impl.StdSchedulerFactory' threw an exception.
我真的在网上找不到任何帮助.这是配置问题吗?有人知道我可以从哪里获得需要配置的简单列表吗?
I couldn't really find any help online. Is this a configuration problem? Anybody know where I can get a straightforward list of what needs to be configured?
(我使用的是 Quartz.Net 2.0)
(I'm using Quartz.Net 2.0)
内部异常:{无法从配置部分'common/logging'获取Common.Logging的配置."}
INNER EXCEPTION: {"Failed obtaining configuration for Common.Logging from configuration section 'common/logging'."}
推荐答案
您很可能没有引用所有必需的程序集,例如Common.Logging.dll".
You most likely do not reference all required assemblies e.g. "Common.Logging.dll".
更新
构造函数失败,因为您的 app.config
或 web.config
不包含 common\logging
部分.您的 .config
文件是否包含以下部分:
The constructor fails because your app.config
or web.config
does not contain a section for common\logging
. Does your .config
file contains the following section:
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
<common>
<logging>
<factoryAdapter type="Common.Logging.Simple.TraceLoggerFactoryAdapter, Common.Logging">
<arg key="level" value="DEBUG" />
<arg key="showLogName" value="true" />
<arg key="showDataTime" value="true" />
<arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" />
</factoryAdapter>
</logging>
</common>
这篇关于'Quartz.Impl.StdSchedulerFactory' 的类型初始值设定项抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!