Hi Thomas,
I have completed the investigation with the help of product development team. In fact, there is no such bug in Aspose.Tasks for .NET. Actually, we have to set the proper properties.
1) For Task.Start to work correctly, we shall have to set the Project.StartDate less than start date of all the tasks, which is by default current date. Moreover, we shall have to apply the "StartNoEarlierThan" constraint on task.
2) For ResourceAssignment, we shall have to set the RemainingWork property.
A complete working example is as under:
License lic = new License();
lic.SetLicense("Aspose.Total.lic");
Project prj = new Project();
prj.MinutesPerDay = 480;
prj.Calendar = Aspose.Tasks.Calendar.MakeStandardCalendar();
prj.IsScheduleFromStart = true;
prj.StartDate = DateTime.Now.AddMonths(-6);
Task rootTsk = new Task();
Task tsk1 = new Task("tsk1");
Task tsk2 = new Task("tsk2");
Task tsk3 = new Task("tsk3");
tsk1.Start = DateTime.Parse("30-Oct-2009 08:00 AM");
tsk2.Start = DateTime.Parse("10-Nov-2009 08:00 AM");
tsk3.Start = DateTime.Parse("25-Dec-2009 08:00 AM");
tsk1.Duration = new TimeSpan(3 * 8, 0, 0);
tsk1.DurationFormat = TimeUnitType.Day;
tsk2.Duration = new TimeSpan(4 * 8, 0, 0);
tsk2.DurationFormat = TimeUnitType.Day;
tsk3.Duration = new TimeSpan(25 * 8, 0, 0);
tsk3.DurationFormat = TimeUnitType.Day;
tsk1.IgnoreResourceCalendar = true;
tsk1.Type = TaskType.FixedUnits;
tsk1.ConstraintType = ConstraintType.StartNoEarlierThan;
tsk2.IgnoreResourceCalendar = true;
tsk2.Type = TaskType.FixedUnits;
tsk2.ConstraintType = ConstraintType.StartNoEarlierThan;
tsk3.IgnoreResourceCalendar = true;
tsk3.Type = TaskType.FixedUnits;
tsk3.ConstraintType = ConstraintType.StartNoEarlierThan;
prj.RootTask = rootTsk;
rootTsk.Children.Add(tsk1);
rootTsk.Children.Add(tsk2);
rootTsk.Children.Add(tsk3);
Resource res = new Resource();
Resource res1 = new Resource("res1");
Resource res2 = new Resource("res2");
prj.Resources.Add(res);
prj.Resources.Add(res1);
prj.Resources.Add(res2);
ResourceAssignment ra1 = new ResourceAssignment(tsk1, res1);
ra1.Units = 2;
ra1.RemainingWork = new TimeSpan((long)ra1.Units * tsk1.Duration.Ticks);
ResourceAssignment ra2 = new ResourceAssignment(tsk2, res2);
ra2.Units = 2;
ra2.RemainingWork = new TimeSpan((long)ra2.Units * tsk2.Duration.Ticks);
prj.ResourceAssignments.Add(ra1);
prj.ResourceAssignments.Add(ra2);
prj.CalcTaskIds();
prj.CalcTaskUids();
prj.CalcResourceAssignmentIds();
prj.CalcResourceAssignmentUids();
prj.CalcResourceIds();
prj.CalcResourceUids();
prj.CalcResourceFields();
prj.CalcResourceStartFinish();
ProjectWriter prjWrt = new ProjectWriter();
FileStream fs = new FileStream("d:\\mpp\\thomas\\mpp_st.xml", FileMode.Create, FileAccess.Write);
prjWrt.Write(prj, fs, TasksDataFormat.XML);
fs.Close();