Setting start date causes 'The difference between start and finish date cannot be more than 50 years.' (25.5 KB)

my code is:

var project = new Project(“c:\test.mpp”);
var parent2 = project.SelectAllChildTasks().FirstOrDefault(t => t.Get(Tsk.Name) == “11991”);
var child12 = parent2.Children.Add(“11991 1”);
child12.Set(Tsk.Start, new DateTime(2019, 1, 4));
child12.Set(Tsk.Duration, project.GetDuration(1, TimeUnitType.Day));

the error only occurs if task 11991 has a pred, if I remove the predecessor from the file it doesn’t cause an error.


We were able to reproduce this issue and it has been logged with ID “TASKSNET-3028” for further investigation. You will automatically be informed here once we have more information to share.

The issues you have found earlier (filed as TASKSNET-3028) have been fixed in this update.