Browse our Products

Aspose.Tasks for .NET 23.10 Release Notes

All Changes

KeySummaryIssue Type
TASKSNET-11003Add validation which ensures that Project.Calendar points to calendar belonging to Project.Calendars collectionEnhancement
TASKSNET-11002Add public API to allow passing of encoding when reading Primavera XER filesEnhancement
TASKSNET-10971Modify hierarchy of Save Options to remove members of SaveOptions not applicable to certain formatsEnhancement
TASKSNET-10815Add reading of baseline projects for Primavera XML formatEnhancement

Public API and Backwards Incompatible Changes

The following public types were added:Description
Aspose.Tasks.Saving.SimpleSaveOptionsThis is an abstract base class that allow the user to specify basic options when saving a project into a particular format.
The following public methods and properties were added:Description
Aspose.Tasks.LoadOptions.EncodingGets or sets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats.
Aspose.Tasks.PrimaveraProjectProperties.CurrentBaselineProjectIdGets Id of the current baseline project.
Aspose.Tasks.PrimaveraProjectProperties.BaselineProjectsGets array of baseline projects of current project.
Aspose.Tasks.PrimaveraReadOptions.ReadBaselineProjectsGets or sets a flag that specifies whether baseline projects should be loaded. The default value is true.
Aspose.Tasks.PrimaveraTaskProperties.BudgetedLaborCostGets the value of budgeted (or planned) labor cost .
Aspose.Tasks.PrimaveraTaskProperties.BudgetedNonlaborCostGets the value of budgeted (or planned) non labor cost .
Aspose.Tasks.PrimaveraTaskProperties.BudgetedMaterialCostGets the value of of budgeted (or planned) material cost.
Aspose.Tasks.PrimaveraTaskProperties.BudgetedExpenseCostGets the value of budgeted (or planned) expense cost.
Aspose.Tasks.PrimaveraTaskProperties.BudgetedTotalCostGets the total value of budgeted (or planned) costs.
Aspose.Tasks.Project.Save(System.String,Aspose.Tasks.Saving.SimpleSaveOptions)Saves the document to a file using the specified save options.
Aspose.Tasks.Project.Save(System.IO.Stream,Aspose.Tasks.Saving.SimpleSaveOptions)Saves the project to a stream using the specified save options.
Aspose.Tasks.Saving.CsvOptions.ViewGets or sets a list of the view columns () to save to XLSX format.
Aspose.Tasks.Saving.SimpleSaveOptions.#ctor
Aspose.Tasks.Saving.SimpleSaveOptions.SaveFormatGets or sets the format in which the document will be saved if this save options object is used.
Aspose.Tasks.Saving.SimpleSaveOptions.TasksComparerGets or sets the comparer to sort tasks on Gantt chart and Task Sheet chart.
Aspose.Tasks.Saving.SimpleSaveOptions.TasksFilterGets or sets the condition which is used to filter tasks rendered on Gantt, Task Sheet and Task Usage charts.
Aspose.Tasks.Saving.Spreadsheet2003SaveOptions.ViewGets or sets a list of the view columns () to save.
Aspose.Tasks.Saving.XlsxOptions.ViewGets or sets a list of the view columns () to save to XLSX format.
The following public methods and properties were deleted:Description
Aspose.Tasks.Project.Save(System.String,Aspose.Tasks.Saving.SaveOptions)
Aspose.Tasks.Project.Save(System.IO.Stream,Aspose.Tasks.Saving.SaveOptions)
Aspose.Tasks.Resource.Notes
Aspose.Tasks.ResourceAssignment.LevelingDelayFormat
Aspose.Tasks.ResourceAssignment.Notes
Aspose.Tasks.Saving.SaveOptions.SaveFormat
Aspose.Tasks.Saving.SaveOptions.TasksComparer
Aspose.Tasks.Saving.SaveOptions.TasksFilter
Aspose.Tasks.Task.LevelingDelayFormat
The following public enumerations were deleted:Description
Aspose.Tasks.Asn.LevelingDelayFormat
Aspose.Tasks.Asn.Notes
Aspose.Tasks.AsnKey.LevelingDelayFormat
Aspose.Tasks.Rsc.Notes
Aspose.Tasks.TaskKey.LevelingDelayFormat
Aspose.Tasks.Tsk.LevelingDelayFormat

Examples and additional notes

Related issue: TASKSNET-11002 - Add public API to allow passing of encoding when reading Primavera XER files.

Starting with 23.10 encoding of input file can be set using LoadOptions.Encoding property:

LoadOptions lo = new LoadOptions();
lo.Encoding = Encoding.GetEncoding(1251);
lo.PrimaveraReadOptions = new PrimaveraReadOptions();
var project = new Project("encoding1251.xer", lo);

Related issue: TASKSNET-10971 - Modify hierarchy of Save Options to remove members of SaveOptions not applicable to certain formats.

Prior to version 23.10, all save options classes were inheritors of SaveOptions, which contained properties related to views that are not applicable to certain formats. For example Timescale or UseGradientBrush properties do not make sense when saving a project to Excel or MPX format.

To address this issue, a new base class for save options was intoduced: SimpleSaveOptions. The following save options classes are now inherited from SimpleSaveOptions: CsvOptions, MPPSaveOptions, PrimaveraSaveOptions, PrimaveraXmlSaveOptions, Spreadsheet2003SaveOptions, XlsxOptions. The following save options classes are still inherited from SaveOptions: HtmlSaveOptions, ImageSaveOptions, PdfSaveOptions, SvgOptions, XamlOptions, XpsOptions because these formats involve rendering and saving a project’s view to the output file.

Related issue: TASKSNET-10815 - Add reading of baseline projects for Primavera XML format.

The following applies to projects read from Primavera XML format (Primavera XER format doesn’t support baselines). While Microsoft Project allows 1-10 baselines and only has a limited number of baseline properties, Primavera allows an unlimited number of baseline projects, which are full snapshots of the original project. Starting with version 23.10, the baseline project can be examined using the PrimaveraProperties.BaselineProjects property:

Project project = new Project("BaselineProjects.xml");

Console.WriteLine("Current baseline project uid: " + project.PrimaveraProperties.CurrentBaselineProjectId);

foreach (var baselineProject in project.PrimaveraProperties.BaselineProjects)
{
    Console.WriteLine("Baseline project: uid: {0}, name: '{1}'", baselineProject.Uid, baselineProject.Name);
}

var baseline1 = project.PrimaveraProperties.BaselineProjects[1];

var task = GetTaskByActivityId(project, "A1000");
var baselineTask = GetTaskByActivityId(baseline1, "A1000");

Console.WriteLine("Task budgeted total cost: " + task.PrimaveraProperties.BudgetedTotalCost);
Console.WriteLine("Task baseline budgeted total cost: " + baselineTask.PrimaveraProperties.BudgetedTotalCost);