Thank you for contacting Aspose support team.
A project file “Project1.xml” is created using Microsoft Project (MSP) 2010 by adding only tasks (no resource, no assignment) as shown in the attached image MSP2010File.png.
This file is used to display assignments count as shown in the following sample code:
static void GetAssignmentCount(Task tsk)
Console.WriteLine(tsk.Get(Tsk.Name) + "," + tsk.Assignments.Count);
if(tsk.Children.Count() > 0)
foreach(var tsk1 in tsk.Children)
static void Tasks_165621()
Project oProjMpp = new Project(@"Project1.xml");
TaskCollection otskCol = oProjMpp.RootTask.Children;
foreach (var task in otskCol)
Following is the output of the program:
Task 1, 0
Task 2, 1
Task 3, 0
Task 4, 0
Task 5, 1
This shows that task 2 and 5 has one assignment each whereas in the actual project file using MSP 2010, no assignment was done.
Now if we open the XML file created by MSP 2010, we can observe that Microsoft project has itself added assignments as can be seen between tags ASSIGNMENTS. This is default behavior of MSP that it adds assignment to the child tasks under a summary task automatically which are actually read by Aspose.Tasks. Hence this does not seem to be a bug in Aspose.Tasks.
You may please convert your project file into XML and open it in some editor like notepad. You will observe these assignments there. If you don’t find any assignment in project, and still Aspose.Tasks is reading it, please share your sample project file with is. We will analyze it and share the feedback.
MSP2010File.png (6.7 KB)
ProgramOutput.png (921 Bytes)
Project1.zip (2.8 KB)