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

Free Support Forum - aspose.com

Taking ages to create tasks

Taking long time to create a MPP. Approximately 3 days to create 15000 tasks in a single MPP file. I have attached the sample project to simulate this issue.


Can you please help me on resolve the issue.


Hi Sanjay,

Thank you for writing to Aspose Support team.

You are using the legacy API of Aspose.Tasks for .NET that has been phased out few months back from now. Please try the latest version of Aspose.Tasks for .NET 8.4.1 that completes this task in less than two minutes. We hope you won’t face any issue using this new version, but still if you need some help converting to the new code sample, you may take guidance from our Migration article. Here is the converted code as per the new API.

Sample Code:



var defaultMppTemplateFile = @“DefaultmppTemplate.mpp”;

Project project = new Project(defaultMppTemplateFile);


Console.WriteLine(DateTime.Now);

for(int i = 1; i <=10000; i++)

{

project.RootTask.Children.Add(string.Format(“Task {0}”, i));


if (i % 50 == 0)

Console.WriteLine("{0} items {1}", i, DateTime.Now);

}

Console.WriteLine(DateTime.Now);

project.Save(@“d:\test.mpp”, Aspose.Tasks.Saving.SaveFileFormat.MPP);