MPPSaveOptions.WriteViewData property

Gets or sets a value indicating whether to write view data when saving to MPP. View data includes Project.Views, Filters and Tables collections.

public bool WriteViewData { get; set; }


Shows how to save project into a stream as an MPP file.

using (var stream = new FileStream(OutDir + "EmptyProjectSaveStream_out.xml", FileMode.Create, FileAccess.Write))
    var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

    // create save options
    var options = new MPPSaveOptions
        // sets a value indicating whether to remove invalid resource assignments when saving to MPP
        RemoveInvalidAssignments = true

    // save MPP with options
    project.Save(stream, options);

See Also