I have method which retrieve all baselines of task, however it seems that there is only one baseline but in microsoft project I set like 3.
My method
public static List<BaselineDto> GetAllBaseLine(this Task task) { if (task?.Baselines == null) { return new List<BaselineDto>(); } return task.Baselines.Select(baseline => new BaselineDto { Duration = new DurationValueDto { TimeSpan = baseline.Duration.TimeSpan, TimeUnit = baseline.Duration.TimeUnit }, Finish = baseline.Finish, Interim = baseline.Interim, Start = baseline.Start, DurationFormat = baseline.DurationFormat, EstimatedDuration = baseline.EstimatedDuration, FixedCost = baseline.FixedCost, TimephasedData = baseline.TimephasedData.ToList(), Bcwp = baseline.Bcwp, Bcws = baseline.Bcws, Cost = baseline.Cost, Work = baseline.Work.ToDouble(), BaselineNumber = baseline.BaselineNumber }).ToList(); }
Mpp file and screenshot of baselines in it
Screenshot_158.png (7.0 KB)
тест база.zip (447.3 KB)