我为 .Net3.5 SP1 V1.0.2856.0 安装了反应式扩展。一切正常我基于一行代码构建了一个 Windows 服务
Scheduler.NewThread.Schedule(action, new DateTimeOffset(startDate));
线程准时启动,但片刻后应用程序崩溃:-
System.ArgumentOutOfRangeException was unhandled
Message="Number must be either non-negative and less than or equal to Int32.MaxValue or -1.\r\nParameter name: timeout"
Source="mscorlib"
ParamName="timeout"
StackTrace:
at System.Threading.Thread.Sleep(TimeSpan timeout)
at System.Concurrency.NewThreadScheduler.<>c__DisplayClass1.<Schedule>b__0()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
我卸载了 Windows 更新并使用了 Reactive Extensions 安装程序的修复选项。仍然没有任何工作。我认为注册表中有一些值被更改,需要存储回来。