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

Free Support Forum - aspose.com

Error exception on change constraint

I’ve experienced an issue opening a previously saved MPP by Aspose. In this scenario, I only open the MPP File and set the constraint date to this day. I’ve attached the source and MPP file.

public void Case021()


using (var stream = File.Open(@"F:\Iniciativa Folgas Planejadas01-02-201715-59.mpp", FileMode.Open))


var project = new Project(stream);

project.RootTask.Children.First().Set(Tsk.ConstraintType, ConstraintType.StartNoEarlierThan);

project.RootTask.Children.First().Set(Tsk.ConstraintDate, DateTime.Now);



The code above throw the exception:

Object reference not set to an instance of an object.

at . (SplitPartCollection )

at . (DateTime , SplitPartCollection )

at . (DateTime )

at Aspose.Tasks.ResourceAssignment. (DateTime )

at Aspose.Tasks.Task. ()

at . ()

at . ()

at Aspose.Tasks.Task. ()

at Aspose.Tasks.Task. (Boolean )

at . (Task , DateTime )

at Aspose.Tasks.Task. [T]( , T )

at Aspose.Tasks.Task.Set[T](Key`2 key, T val)


Thank you for posting your inquiry.

We were able to reproduce this issue at our end and have logged it as TASKSNET-1798 for further investigation by our Product team. We’ll update you here once there is some information or a fix version available in this regard.


We have just released Aspose.Tasks for .NET 17.7 version where this issue has been fixed. Please download this latest version for testing at your end and let us know if we can be of any additional help to you.