We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

SplitParts missing time

I have a problem with exporting a project to mpp. Most of the tasks export fine, but there is 1 task that does not generate the split parts correctly. The task runs from 11pm to 2am the next day. The calendar for the project is a 24hr calendar. There is only 1 split generated and it runs from 11am to 12am - missing the last 2 hours.

I would either expect the 1st split to run for the full 3 hours, or I would expect a 2nd split generated to cover the last 2 hours.

I have attached a fully working project so you can see what I mean. Exporter.zip (46.7 KB)


Thank you for writing to Aspose support team again.

I have tried the scenario but could not re-produce issue as I get the same values in export.mpp file as in the code given below:

void SetStartAndFinishDatesOnTask(Project project, Aspose.Tasks.Task newTask, DummyDataRow split)
    var asposeDuration = project.GetDuration(split.Duration.TotalMinutes, TimeUnitType.Minute);
    newTask.Set(Tsk.Type, TaskType.FixedDuration);
    newTask.Set(Tsk.Start, split.Start.LocalDateTime);//Aug 21, 2017 08:00 PM
    newTask.Set(Tsk.Duration, asposeDuration);
    newTask.Set(Tsk.Finish, split.Finish.LocalDateTime);//Aug 21, 2017 11:00 PM
    newTask.Set(Tsk.IsManual, true);
    newTask.Set(Tsk.ManualStart, split.Start.LocalDateTime);
    newTask.Set(Tsk.ManualDuration, asposeDuration);
    newTask.Set(Tsk.ManualFinish, split.Finish.LocalDateTime);
    if (split.Duration.TotalMinutes <= 0)
        newTask.Set(Tsk.IsMilestone, true);

Could you please let us know how to re-produce the issue here? Also please ensure that you have sent us right code and sample data.

Ah I see - you are in a different timezone, so the task doesn’t span midnight.
Please change the start and finish times of the task so that they are 11pm and 2am in your local time, and you will see the error.


I have tried the scenario by changing the timezone but afraid that issue is not re-produced and file is saved with proper splits as shown in the attached image. Could you please set your timezone to GMT+5 hr and test the scenario again. Please note that i have saved the file before function ValidateTimes() as shown below:

project.CalculationMode = CalculationMode.Manual;
project.Save(@"exportWithManualMode.mpp", new Aspose.Tasks.Saving.MPPSaveOptions());
ValidateTimes(project, tasksAndActivities);
//return for saving
return project;

ExportedOutput.png (63.1 KB)
exportWithManualMode.zip (27.3 KB)

I can confirm that moving the Save before the Validation method did not fix the problem.

I have attached the data file with the timezone data removed TasksAndActivities.zip (344 Bytes), so if you replace the current file with this (in the Data folder) it will use whatever your local timezone is.

Please make sure that you have break point on line 440 of WriteExportFile.cs as that is where the validation fails.

if (row.SplitParts.Max(x => x.Finish) != activity.Finish)
    throw new Exception($"Validation of finish date failed for the Split for Activity id={activity.Id}, start={activity.Start}, finish={activity.Finish}, number of splits={row.SplitParts.Count}, exported start={row.SplitParts.Min(x => x.Start)}, exported finish={row.SplitParts.Max(x => x.Finish)}");


We are working on this issue and investigating the cause of issue in your code. We will write back here as soon as feedback is ready to share.


This issue is reproduced and logged under Id:TASKSNET-2108 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

Hi is there any update on this? I notice it did not make the cutoff for version 17.9 of Aspose.Tasks for .NET.


It is currently under investigation by our Product team, but no ETA is available for resolution of the same. We’ll notify you here once there is some update or a fix version available in this regard.

I notice TASKSNET-2108 now says it is resolved. What was the outcome?


Thank you for contacting Aspose support team again.

This issue is resolved and will be part of our next release Aspose.Tasks for .NET 17.10.0. You will be automatically notified once this release is ready and available online for download. Your patience and understanding is highly appreciated in this regard.


The issue you reported here has been fixed in this latest version of Aspose.Tasks for .NET 17.11 that is available for download now.