Scheduling conflicts message displaying on opening MPP file (C# .NET)

Hi Team,

Scheduling conflicts for task message displaying on opening MPP file.May i know the problem.

Please find the attachment.
Conflict Issue.zip (57.1 KB)

Note: Same issue exist with latest version(20.7) also.

Regards,
Ravi K

@ravikonnur,

The above issue is observed on opening the output file. An issue with ID TASKSNET-4266 has been created to further investigate the issue. We will share feedback with you as soon as the issue will be fixed.

@ravikonnur,

After investigation of issue it has been observed that issue lies in your implementation. Actually, you have set ActualStart for Task4 and Task5,

( line “task.Set(Tsk.ActualStart, DateTime.Now);”)

Thus, “Start” field for these task was recalculated (the same behavior as in MS Project does).
Thus Task4 and Task5 have start DateTime.Now, where as summary task “SubTask” has Start = DateTimeNow.AddDays(2) which leads to scheduling conflict. I hope the shared elaboration will be helpful. You can modify the dates as per your own requirements.

After completing Task1 and Task2 immediately task4 and task5 should start so
task1 and task2 finished the task by below line:
task.Set(Tsk.ActualFinish, DateTime.Now);

for task4 and task5 will be set like below:
task.Set(Tsk.ActualStart, DateTime.Now)

Is summaryTask “subTask” actualStart can be less than Start?
ex:
TASK | START | ACTUAL START
subTask | Wed 08-07-20 14:49 | Wed 06-07-20 14:49

Regards,
Ravi K

@ravikonnur,

We will share further feedback with you as soon as it will be shared.

@ravikonnur,

ActualStart cannot be less than Start for summary task. But because you have ManualMode, Start for summary task is not recalculated. So you can set ActualStart explicitly:


                if (i > 3)
                {
                    startTime = DateTime.Now.AddDays(2);
                    task.Set(Tsk.Start, startTime);

                    endTime = startTime.AddDays(1);
                    task.Set(Tsk.Finish, endTime);

                    task.Set(Tsk.Name, "Task" + i);
                    task.Set(Tsk.OutlineLevel, 3);
                    project.SetBaseline(BaselineType.Baseline, new Aspose.Tasks.Task[] { task });
                    task.Set(Tsk.ActualStart, DateTime.Now.AddDays(2));

                    task.ParentTask.Set(Tsk.ActualStart, startTime);
                    //task.Set(Tsk.ActualFinish, DateTime.Now);
                }               

After setting the constraint date and type conflict issue is not coming. Can i continue with this
or will it affect any other functionality.

setting constraint date and type like below:

          task.Set(Tsk.ActualStart, startTime);

          task.Set(Tsk.ConstraintDate, startTime);
          task.Set(Tsk.ConstraintType, ConstraintType.AsSoonAsPossible);

@ravikonnur,

If this work for you without any issue then its fine. We have shared the root cause of the issue and possible option with you in previous response.