I am new to C# world and just started to use this library. My company is a little behind on development tool so I am still on Visual Studio 2005. My OS is Windows XP SP3.
Here is my test code snippet:
TaskDefinition tDefinition = tService.NewTask();
MonthlyDOWTrigger trigger = new MonthlyDOWTrigger(DaysOfTheWeek.Monday, MonthsOfTheYear.January, WhichWeek.FirstWeek);
trigger.Enabled = true;
When it is executed, the last line gives me ArgumentException:
System.Argumentexception: Value does not fall within the expected range.
at Microsoft.Win32.TaskScheduler.V1Interop.ITaskTrigger.SetTrigger(TaskTrigger& Trigger)
at Microsoft.Win32.TaskScheduler.Trigger.Bind(ITask iTask)
at Microsoft.Win32.TaskScheduler.TriggerCollection.Add(Trigger unboundTrigger)
Any idea what I am doing wrong?
Thanks for your help!