I’ve experienced an issue working with Aspose 17.1.
The issue I can simulate with the attached file with the following procedures:
-
- Take Task A (Atividade A);
-
- Take Task B (Atividade B);
-
- Set A as predecessor of B;
- Verify the start of B after finish of A.
The source code and the PERA 0110-02-201709-11.mpp are attached.
[TestMethod]
public void Case022()
{
using (var stream = File.Open(@"F:\PERA 0110-02-201709-11.mpp", FileMode.Open))
{
var project = new Project(stream);
var atividadeATask = project.RootTask.Children.GetById(4);
var atividadeBTask = project.RootTask.Children.GetById(5);
Assert.IsTrue(atividadeATask.Get(Tsk.Finish) > atividadeBTask.Get(Tsk.Start));
project.TaskLinks.Add(atividadeATask, atividadeBTask, TaskLinkType.FinishToStart, project.GetDuration(0));
// THE ERROR OCCURS HERE! The start of Task B isn't after the finish of Task A.
Assert.IsTrue(atividadeATask.Get(Tsk.Finish) <= atividadeBTask.Get(Tsk.Start));
}
}