TaskDependency is not working correctly

Hi,
I am assigning few task in a looped way and providing only duration,
at the start after instantiating the project i am only providing project’s start date

after the tasks are added am adding the task links , task links are coming correctly but the start date of tasks are always the project start date, don’t know why

How to go about that

Thank you

Hi Biswajeet,


Thank you for writing to Aspose support team.

This scenario is tested using Aspose.Tasks for .NET 8.3.0, however no issue is observed in the tasks dependency. Image of output project file is attached here for your reference. Could you please test the following code with the above mentioned library and share your feedback with us?


Project proj = new Project();
proj.Set(Prj.StartDate, new DateTime(2015, 1, 1));

Task task1 = proj.RootTask.Children.Add(“Task 1”);
task1.Set(Tsk.Duration, task1.ParentProject.GetDuration(2, TimeUnitType.Day));
Task task2 = proj.RootTask.Children.Add(“Task 2”);
task2.Set(Tsk.Duration, task2.ParentProject.GetDuration(3, TimeUnitType.Day));
Task task3 = proj.RootTask.Children.Add(“Task 3”);
task3.Set(Tsk.Duration, task3.ParentProject.GetDuration(4, TimeUnitType.Day));

TaskLink link1 = proj.TaskLinks.Add(task1, task2);
TaskLink link2 = proj.TaskLinks.Add(task2, task3);

proj.Save(“LinkedTasks.xml”, SaveFileFormat.XML);

quick question for time being

is it better to use root task rather than indenting and outdenting , for large number of tasks?

am not getting that SET method, for task only “SetPercentComplete” is coming

could you help me

Hi Biswajeet,

biswajeet.m:
quick question for time being
is it better to use root task rather than indenting and outdenting , for large number of tasks?

It is better to use root task for adding child tasks rather than outdenting. Its performance is quite better than using OutlineIndent and OutlineOutdent.

biswajeet.m:
am not getting that SET method, for task only "SetPercentComplete" is coming
could you help me

It seems that you are using old library. Please use Aspose.Tasks for .NET 8.3.0 as it contains the new features as mentioned in the above example.

You may please have a look at this link to get more information about using new library.

Hi,
In our application, we have huge number of lines written using the previous Aspose.Tasks i.e. 7.3.0. But as per the new dll i.e. 8.3.0/8.5.0 those code becomes unusable.
Do you have any kind of migration tool to convert from previous code structure to new one?

Regards,
Biswajeet

Hi Biswajeet,

Thank you for writing to Aspose support team.

We are sorry to share that there is no such ready-made migration tool for conversion of previous code structure to the new one. However, you may take help from our Migration article to port your code to the latest API. Please let us know if you face any difficulty in this. We’ll be glad to assist you further.