从vs 2017开始,它可以在调试模式下正常工作,但是在发布后尝试运行以下异常
2019-03-24 13:55:45,475 [18792] INFO Common.Logging.Factory.AbstractLogger.Info(:0) - Initialized Scheduler Signaller of type: Quartz.Core.SchedulerSignalerImpl
2019-03-24 13:55:45,487 [18792] INFO Common.Logging.Factory.AbstractLogger.InfoFormat(:0) - Quartz Scheduler v.2.0.0.100 created.
2019-03-24 13:55:45,492 [18792] INFO Common.Logging.Factory.AbstractLogger.Info(:0) - Scheduler meta-data: Quartz Scheduler (v2.0.0.100) 'ServerScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'Quartz.Core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'Quartz.Simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'Quartz.Simpl.RAMJobStore' - which does not support persistence. and is not clustered.
2019-03-24 13:55:45,493 [18792] INFO Common.Logging.Factory.AbstractLogger.Info(:0) - Registering Quartz Job Initialization Plug-in.
2019-03-24 13:55:45,500 [18792] INFO Common.Logging.Factory.AbstractLogger.Info(:0) - Scheduler ServerScheduler_$_NON_CLUSTERED shutting down.
2019-03-24 13:55:45,501 [18792] INFO Common.Logging.Factory.AbstractLogger.Info(:0) - Scheduler ServerScheduler_$_NON_CLUSTERED paused.
2019-03-24 13:55:45,504 [18792] ERROR Jagaha.QuartzServer.QuartzServer.Initialize(:0) - Server initialization failed:Thread has not been started.
System.Threading.ThreadStateException: Thread has not been started.
at System.Threading.Thread.JoinInternal(Int32 millisecondsTimeout)
at System.Threading.Thread.Join()
at Quartz.QuartzThread.Join()
at Quartz.Core.QuartzScheduler.Shutdown(Boolean waitForJobsToComplete)
at Quartz.Impl.StdSchedulerFactory.Instantiate()
at Quartz.Impl.StdSchedulerFactory.GetScheduler()
at Jagaha.QuartzServer.QuartzServer.GetScheduler()
at Jagaha.QuartzServer.QuartzServer.Initialize()
任何建议都是解决控制台应用程序已发布版本的解决方案。
答案 0 :(得分:0)
一种将参考DLL从构建调试文件夹手动放入发布文件夹的解决方案。虽然这不是一个完美的解决方案,但可以解决问题