Free Support Forum -

I can able to create plan in PDF format but not in MPP format

Hi ,

I am trying to create MPP file but MPP file is creating with 0 byte. While PDF file is creating correctly
string FName1 = @“D:\Pyramid\Angular\TestData\test.mpp”;

        Project project = new Project();
        MPPSaveOptions MSP = new MPPSaveOptions();
        MSP.WriteViewData = true;
        Aspose.Tasks.Task task = project.RootTask.Children.Add("Task1");
        task.Set(Tsk.Start, new DateTime(2019, 8, 1));
        task.Set(Tsk.Finish, new DateTime(2019, 8, 5));
        task.Set(Tsk.Duration, project.GetDuration(1, TimeUnitType.Week));
        System.Diagnostics.Debug.WriteLine("Project Version : " + project.Get(Prj.SaveVersion).ToString());
        //project.Save(FName1, MSP);
        project.Save(FName1, SaveFileFormat.MPP);


I have observed the issue shared by you and request you to please try using latest Aspose.Tasks for .NET 20.1 on your end. In case there is still an issue then please share the source MPP file reproducing the issue on your end along with generated output.