I'm getting this when editing a Task and trying to change the behaviour if the Task is already running.
System.InvalidCastException was unhandled
HResult=-2147467262
Message=Specified cast is not valid.
Source=Microsoft.Win32.TaskSchedulerEditor
StackTrace:
at Microsoft.Win32.TaskScheduler.TaskPropertiesControl.taskMultInstCombo_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
I'm calling the UI Dialog as follows:
Microsoft.Win32.TaskScheduler.Task dct = null;
try
{
dct = util.CreateTask();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
if (dct != null)
{
TaskEditDialog ted = new TaskEditDialog(dct, true, true);
try { ted.ShowDialog(); }
catch (Exception ex) { MessageBox.Show(ex.Message); }
}
Windows 10 Professional. Visual Studio 2012. Nuget packages installed Sep 2015. Any assistance gratefully received.
Comments: Fixed in 2.5.0 release.
System.InvalidCastException was unhandled
HResult=-2147467262
Message=Specified cast is not valid.
Source=Microsoft.Win32.TaskSchedulerEditor
StackTrace:
at Microsoft.Win32.TaskScheduler.TaskPropertiesControl.taskMultInstCombo_SelectedIndexChanged(Object sender, EventArgs e)
at System.Windows.Forms.ComboBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ComboBox.WmReflectCommand(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
I'm calling the UI Dialog as follows:
Microsoft.Win32.TaskScheduler.Task dct = null;
try
{
dct = util.CreateTask();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
if (dct != null)
{
TaskEditDialog ted = new TaskEditDialog(dct, true, true);
try { ted.ShowDialog(); }
catch (Exception ex) { MessageBox.Show(ex.Message); }
}
Windows 10 Professional. Visual Studio 2012. Nuget packages installed Sep 2015. Any assistance gratefully received.
Comments: Fixed in 2.5.0 release.