My sample code below
var project = new Project(“c:\Blank2010.mpp”);
var parameters = new RecurringTaskParameters
{
TaskName = “Recurring task”,
Duration = project.GetDuration(1, TimeUnitType.Day),
RecurrencePattern = new WeeklyRecurrencePattern
{
Repetition = new WeeklyRepetition
{
RepetitionInterval = 2,
WeekDays = WeekdayType.Sunday | WeekdayType.Saturday
},
RecurrenceRange = new EndAfterRecurrenceRange
{
Start = new DateTime(2018, 1, 1, 8, 0, 0),
OccurrenceNumber = 12
}
}
};
project.RootTask.Children.Add(parameters);
This will result in
Recurring task
Recurring task 1 - 1/5/19 - 1/5/19
Recurring task 2 - 1/6/19 - 1/6/19
Recurring task 3 - 1/19/19 - 1/19/19
But on MS Project when doing it the result is
Recurring task
Recurring task 1 - 1/5/19 - 1/5/19
Recurring task 2 - 1/13/19 - 1/13/19
Recurring task 3 - 1/19/19 - 1/19/19
So the issue is when using aspose, Jan 5 and Jan 6 is calculated as on the same week, however on the MS Project, Jan 5 and Jan 6 are not set on the same week
Simply aspose tasks calculates that the week starts on a monday (so 5/6 are on the same week 1) while ms pro calculates it so the week starts on a sunday (5 is on week 1 while 6 is on week 2)