Start and end date of Task

The Tasks Start and End dates are not sent to the MPP file.

We are using the code below to set the dates:
image.jpg (19.5 KB)

After we set the dates, we consulted the data:
image.png (32.8 KB)

In XML file, the start, finish and duration was defined:
image.png (1.8 KB)

But in MPP file, the data is wrong:

  • Manual calc
    image.png (1.8 KB)
  • Automatic calc (the start date has been changed to the start date of the Project)
    image.png (1.5 KB)

Could you help us?

1 Like

@henrique.ramos,

Thank you for contacting Aspose support team.

I have tried to reproduce the scenario using following sample code with the latest library Aspose.Tasks for .NET 18.4.0, but could not observe any issue. Could you please give it a try and share the feedback?

Project proj = new Project(@"sample.mpp");
Task tsk1 = proj.RootTask.Children.GetById(1);
tsk1.Set(Tsk.Start, new DateTime(2018,1,1,8,0,0));
tsk1.Set(Tsk.Duration, proj.GetDuration(30));
proj.Save(@"output.mpp",new MPPSaveOptions() { });

If issue is not resolved, please send us source MPP file, the output MPP file and a console application containing Aspose.Tasks code only which can be compiled and executed here without any error. It will help us to observe the problem and provide assistance accordingly.