Task baselines don't save to MPP file

Hello,

I import the MPP file attached and execute the code bellow, but the MPP file exported don't have the baselines created:

public ActionResult SetBaseLine()
{
	using (Stream fs = new FileStream("C:/TestProject/DefaultProject.mpp", FileMode.Open))
	{
		Project project = new Project(fs);
	<span style="color:blue;">var</span> task1 = project.RootTask.Children.Add(<span style="color:#a31515;">"Task 1"</span>);
	project.SetBaseline(<span style="color:#2b91af;">BaselineType</span>.Baseline, <span style="color:blue;">new</span>[] { task1 });

	task1.Set(<span style="color:#2b91af;">Tsk</span>.Start, <span style="color:blue;">new</span> <span style="color:#2b91af;">DateTime</span>(2017, 2, 1));
	project.SetBaseline(<span style="color:#2b91af;">BaselineType</span>.Baseline1, <span style="color:blue;">new</span>[] { task1 });

	task1.Set(<span style="color:#2b91af;">Tsk</span>.Start, <span style="color:blue;">new</span> <span style="color:#2b91af;">DateTime</span>(2017, 2, 5));
	project.SetBaseline(<span style="color:#2b91af;">BaselineType</span>.Baseline2, <span style="color:blue;">new</span>[] { task1 });

	project.Save(<span style="color:#a31515;">"C:/TestProject/TestBaseLines.Mpp"</span>, <span style="color:#2b91af;">SaveFileFormat</span>.MPP);

	<span style="color:blue;">return</span> Content(<span style="color:#a31515;">"ok"</span>);
}

}

Ps: I’m using ASP.NET MVC
Wating for reponse.


Hi Paulo,


We are sorry for the inconvenience you are facing.

We have investigated the issue at our end and were able to reproduce the problem with the MPP format. It has been logged as TASKSNET-1797 for further consideration by our Product team. We’ll update you here once there is some information or a fix version available in this regard.

@paulo.bandeira,

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.