# ProjectDocument

A typed Microsoft Project document. XML editing preserves source data and never implicitly schedules tasks.

Class 

`OfficeIMO.Project`

**Namespace**

`OfficeIMO.Project`

**Assembly**

`OfficeIMO.Project`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[ProjectDocument.cs:135](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L135)

**Implements**

`IDisposable`

**Modifiers**

sealed

A typed Microsoft Project document. XML editing preserves source data and never implicitly schedules tasks.

## Inheritance

- object
- ProjectDocument

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Create plans and calculate schedules](/docs/project/) Guide

## Usage

Explore 16 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 13

- Property [ProjectDataImportResult.Document](/api/project/officeimo-project-projectdataimportresult/#property-document)
- Method [ProjectDocument.Clone](/api/project/officeimo-project-projectdocument/#method-clone-officeimo-project-projectsaveoptions-threading-cancellationtoken-officeimo-project-projectloadoptions)
- Method [ProjectDocument.Create](/api/project/officeimo-project-projectdocument/#method-create-string-officeimo-project-projectcreateoptions)
- Method [ProjectDocument.CreateFromTemplate](/api/project/officeimo-project-projectdocument/#method-createfromtemplate-io-stream-officeimo-project-projectloadoptions-threading-cancellationtoken)
- Method [ProjectDocument.End](/api/project/officeimo-project-projectdocument/#method-end)
- Method [ProjectDocument.Load](/api/project/officeimo-project-projectdocument/#method-load-string-officeimo-project-projectloadoptions-threading-cancellationtoken)
- Method [ProjectDocument.LoadAsync](/api/project/officeimo-project-projectdocument/#method-loadasync-string-officeimo-project-projectloadoptions-threading-cancellationtoken)
- Method [ProjectDocument.Parse](/api/project/officeimo-project-projectdocument/#method-parse-string-officeimo-project-projectloadoptions-threading-cancellationtoken)
- Method [ProjectDocument.StandardWorkingWeek](/api/project/officeimo-project-projectdocument/#method-standardworkingweek-string)
- Method [ProjectDocument.StartsOn](/api/project/officeimo-project-projectdocument/#method-startson-datetime)
- Method [ProjectExternalProjectResolver.EndInvoke](/api/project/officeimo-project-projectexternalprojectresolver/#method-endinvoke-iasyncresult)
- Method [ProjectExternalProjectResolver.Invoke](/api/project/officeimo-project-projectexternalprojectresolver/#method-invoke-projectdocument-string-cancellationtoken)
- Property [ProjectResourcePoolBinding.Project](/api/project/officeimo-project-projectresourcepoolbinding/#property-project)

### Accepted by parameters 3

- Method [ProjectExternalProjectResolver.BeginInvoke](/api/project/officeimo-project-projectexternalprojectresolver/#method-begininvoke-projectdocument-string-cancellationtoken-asynccallback-object) parameter `referringProject`
- Method [ProjectExternalProjectResolver.Invoke](/api/project/officeimo-project-projectexternalprojectresolver/#method-invoke-projectdocument-string-cancellationtoken) parameter `referringProject`
- Constructor [ProjectResourcePoolBinding.ProjectResourcePoolBinding](/api/project/officeimo-project-projectresourcepoolbinding/#constructor-ctor-officeimo-project-projectdocument-officeimo-project-projectscheduleresult-int32-int32) parameter `project`

Filter members 

Show inherited

## Methods

`public ProjectTask AddRecurringTask(string name, IEnumerable<DateTime> occurrenceStarts, ProjectDuration duration, ProjectTask? parent = null, ProjectCalendar? calendar = null, int maxOccurrences = 10000, CancellationToken cancellationToken = default)` [#](#member-725cd1bef6bd34d1046636f5)

[ProjectDocument.Recurrence.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Recurrence.cs#L13)

Adds a finite expanded recurring summary from strictly increasing local occurrence dates. Children use start-no-earlier-than constraints and the supplied duration; normal calendar scheduling determines their dates. XML retains the occurrences and recurring markers. Microsoft Project imports these as ordinary tasks and does not reconstruct an editable recurrence rule. Enumeration, cancellation, ownership and bounds are checked before adding any task.

Parameters

**name string required**

**occurrenceStarts System.Collections.Generic.IEnumerable<System.DateTime> required**

**duration OfficeIMO.Project.ProjectDuration required**

**parent OfficeIMO.Project.ProjectTask? = null optional**

**calendar OfficeIMO.Project.ProjectCalendar? = null optional**

**maxOccurrences int = 10000 optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectTask`

`public ProjectAssignmentAnalysis AnalyzeAssignments(CancellationToken cancellationToken = default)` [#](#method-analyzeassignments-threading-cancellationtoken)

[ProjectDocument.AssignmentAnalysis.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.AssignmentAnalysis.cs#L6)

Analyzes stored assignment totals and uniform work/material costs without changing dates, actuals, rates, or source caches.

Parameters

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectAssignmentAnalysis`

`public ProjectEarnedValueResult AnalyzeEarnedValue(int baselineNumber = 0, DateTime? statusDate = null, int maxCalendarDays = 36600, CancellationToken cancellationToken = default)` [#](#method-analyzeearnedvalue-int32-nullable-system-datetime-int32-threading-cancellationtoken)

[ProjectDocument.EarnedValue.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.EarnedValue.cs#L6)

Evaluates stored baseline cost curves against independently recorded completion and actual costs. Does not schedule or mutate the project.

Parameters

**baselineNumber int = 0 optional**

**statusDate System.DateTime? = null optional**

**maxCalendarDays int = 36600 optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectEarnedValueResult`

`public ProjectResourceAllocationResult AnalyzeResourceAllocation(ProjectScheduleResult schedule, int maxIntervals = 1000000, CancellationToken cancellationToken = default)` [#](#method-analyzeresourceallocation-officeimo-project-projectscheduleresult-int32-threading-cancellationtoken)

[ProjectDocument.ResourceAllocation.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.ResourceAllocation.cs#L6)

Analyzes concurrent regular work against dated resource availability, without moving tasks or treating overtime as regular capacity.

Parameters

**schedule OfficeIMO.Project.ProjectScheduleResult required**

**maxIntervals int = 1000000 optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectResourceAllocationResult`

`public ProjectResourcePoolResult AnalyzeResourcePool(IEnumerable<ProjectResourcePoolBinding> bindings, int maxIntervals = 1000000, int maxBindings = 10000, CancellationToken cancellationToken = default)` [#](#method-analyzeresourcepool-collections-generic-ienumerable-officeimo-project-projectresourcepoolbinding-int32-int32-threading-cancellationtoken)

[ProjectDocument.ResourcePool.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.ResourcePool.cs#L11)

Combines explicitly mapped assignment demand against this pool's dated availability, without file access or mutation. Schedules use the same local time basis. Rates, calendars, and resource names are not synchronized; calculate each source first. Include the pool's own assignments through an explicit binding when they should contribute.

Parameters

**bindings System.Collections.Generic.IEnumerable<OfficeIMO.Project.ProjectResourcePoolBinding> required**

**maxIntervals int = 1000000 optional**

**maxBindings int = 10000 optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectResourcePoolResult`

`public void ApplyCustomFields(ProjectCustomFieldCalculationResult result, CancellationToken cancellationToken = default)` [#](#method-applycustomfields-officeimo-project-projectcustomfieldcalculationresult-threading-cancellationtoken)

[ProjectDocument.CustomFields.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.CustomFields.cs#L15)

Atomically applies a complete custom-field proposal to its unchanged originating document.

Parameters

**result OfficeIMO.Project.ProjectCustomFieldCalculationResult required**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void ApplyLeveling(ProjectLevelingResult result, CancellationToken cancellationToken = default)` [#](#method-applyleveling-officeimo-project-projectlevelingresult-threading-cancellationtoken)

[ProjectDocument.Leveling.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Leveling.cs#L16)

Applies a complete leveling proposal to its unchanged originating document.

Parameters

**result OfficeIMO.Project.ProjectLevelingResult required**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void ApplySchedule(ProjectScheduleResult result, CancellationToken cancellationToken = default)` [#](#method-applyschedule-officeimo-project-projectscheduleresult-threading-cancellationtoken)

[ProjectDocument.Scheduling.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Scheduling.cs#L19)

Applies an error-free schedule produced for this exact document revision, including assignment calculations when explicitly requested.

Parameters

**result OfficeIMO.Project.ProjectScheduleResult required**

**cancellationToken System.Threading.CancellationToken = default optional**

AssessSave 2 overloads

`public ProjectReport AssessSave(ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-assesssave-officeimo-project-projectsaveoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:99](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L99)

Assesses the current model for the selected format without committing output or calculating a schedule.

Parameters

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectReport`

`public ProjectReport AssessSave(string path, ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-assesssave-string-officeimo-project-projectsaveoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:106](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L106)

Assesses a destination's format, including conversion loss, against the current model revision.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectReport`

`public IDisposable BeginUpdate()` [#](#method-beginupdate)

[ProjectDocument.cs:135](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L135)

Coalesces mutation revisions. This is not a rollback transaction and never calculates a schedule.

Returns

`IDisposable`

`public ProjectCustomFieldCalculationResult CalculateCustomFields(ProjectCustomFieldCalculationOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-calculatecustomfields-officeimo-project-projectcustomfieldcalculationoptions-threading-cancellationtoken)

[ProjectDocument.CustomFields.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.CustomFields.cs#L6)

Evaluates supported task and resource formulas against stored model values. Calculate schedules first when formula inputs depend on changed dates, work, or cost.

Parameters

**options OfficeIMO.Project.ProjectCustomFieldCalculationOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectCustomFieldCalculationResult`

`public ProjectLevelingResult CalculateLeveling(ProjectLevelingOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-calculateleveling-officeimo-project-projectlevelingoptions-threading-cancellationtoken)

[ProjectDocument.Leveling.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Leveling.cs#L6)

Proposes deterministic delays and optional remaining-work interruptions to resolve resource overloads. Preserves recorded actuals.

Parameters

**options OfficeIMO.Project.ProjectLevelingOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectLevelingResult`

`public ProjectScheduleResult CalculateSchedule(ProjectScheduleOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-calculateschedule-officeimo-project-projectscheduleoptions-threading-cancellationtoken)

[ProjectDocument.Scheduling.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Scheduling.cs#L6)

Calculates a schedule without changing stored dates, actuals, costs, or source bytes. Unsupported combinations return diagnostics.

Parameters

**options OfficeIMO.Project.ProjectScheduleOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectScheduleResult`

`public void CaptureBaseline(ProjectScheduleResult schedule, int baselineNumber = 0, bool overwrite = false, int maxIntervals = 1000000, CancellationToken cancellationToken = default)` [#](#method-capturebaseline-officeimo-project-projectscheduleresult-int32-boolean-int32-threading-cancellationtoken)

[ProjectDocument.Baselines.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Baselines.cs#L26)

Captures task, assignment and resource baseline totals and curves from a current calculated schedule. Existing baselines require explicit overwrite.

Parameters

**schedule OfficeIMO.Project.ProjectScheduleResult required**

**baselineNumber int = 0 optional**

**overwrite bool = false optional**

**maxIntervals int = 1000000 optional**

**cancellationToken System.Threading.CancellationToken = default optional**

`public ProjectDocument Clone(ProjectSaveOptions? options = null, CancellationToken cancellationToken = default, ProjectLoadOptions? loadOptions = null)` [#](#method-clone-officeimo-project-projectsaveoptions-threading-cancellationtoken-officeimo-project-projectloadoptions)

[ProjectDocument.Mutation.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Mutation.cs#L66)

Clones the current model through the selected format's validation and preservation contract, without an associated destination.

Parameters

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

**loadOptions OfficeIMO.Project.ProjectLoadOptions? = null optional**

Returns

`ProjectDocument`

Create 3 overloads

`public static ProjectDocument Create()` [#](#method-create)

[ProjectDocument.Lifecycle.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L9)

Creates an in-memory document with deterministic working-time defaults, USD currency, and no implicit dates or calendar.

Returns

`ProjectDocument`

`public static ProjectDocument Create(string path, ProjectCreateOptions? options = null)` [#](#method-create-string-officeimo-project-projectcreateoptions)

[ProjectDocument.Lifecycle.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L16)

Creates a document associated with an XML, MPP, or MPT path; creation does not write a file.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectCreateOptions? = null optional**

Returns

`ProjectDocument`

`public static ProjectDocument Create(Stream stream, ProjectCreateOptions? options = null)` [#](#method-create-io-stream-officeimo-project-projectcreateoptions)

[ProjectDocument.Lifecycle.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L26)

Creates a document associated with a caller-owned writable seekable stream.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Project.ProjectCreateOptions? = null optional**

Returns

`ProjectDocument`

CreateFromTemplate 2 overloads

`public static ProjectDocument CreateFromTemplate(string path, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-createfromtemplate-string-officeimo-project-projectloadoptions-threading-cancellationtoken)

[ProjectDocument.Formats.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Formats.cs#L11)

Loads a document template into an unassociated editable project; saving cannot overwrite the template implicitly.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDocument`

`public static ProjectDocument CreateFromTemplate(Stream stream, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-createfromtemplate-io-stream-officeimo-project-projectloadoptions-threading-cancellationtoken)

[ProjectDocument.Formats.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Formats.cs#L21)

Loads caller-owned template bytes into an unassociated editable project. The input is never rebound as the save destination.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDocument`

`public ProjectView CreateView(ProjectScheduleResult schedule, ProjectViewOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-createview-officeimo-project-projectscheduleresult-officeimo-project-projectviewoptions-threading-cancellationtoken)

[ProjectDocument.Views.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Views.cs#L6)

Captures a portable report from a current schedule without changing stored dates or native presentation data.

Parameters

**schedule OfficeIMO.Project.ProjectScheduleResult required**

**options OfficeIMO.Project.ProjectViewOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectView`

`public void Dispose()` [#](#method-dispose)

[ProjectDocument.Lifecycle.cs:245](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L245)

Disposes the document. Caller-owned streams remain open. Explicit persistence is the default.

`public ProjectDocument End()` [#](#method-end)

[ProjectDocument.Authoring.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Authoring.cs#L35)

Resolves pending aliases and returns the underlying document. No save or calculation occurs.

Returns

`ProjectDocument`

`public ProjectIndicatorResult EvaluateIndicators(ProjectCustomFieldEntityKind entityKind, IEnumerable<ProjectIndicatorRule> rules, bool includeSummaries = true, ProjectCustomFieldCalculationOptions? options = null, CancellationToken cancellationToken = default)` [#](#member-42f75eeec059c8b774fc2e43)

[ProjectDocument.Indicators.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Indicators.cs#L11)

Evaluates ordered caller-supplied graphical rules without mutation. The first true predicate selects the icon and accessible label. Uses stored built-in values and the custom-field calculator; it neither reads nor writes opaque native graphical-indicator definitions. MaxValues bounds both returned entities and total predicate evaluations. At most 1000 rules are accepted.

Parameters

**entityKind OfficeIMO.Project.ProjectCustomFieldEntityKind required**

**rules System.Collections.Generic.IEnumerable<OfficeIMO.Project.ProjectIndicatorRule> required**

**includeSummaries bool = true optional**

**options OfficeIMO.Project.ProjectCustomFieldCalculationOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectIndicatorResult`

`public ProjectDataExportResult ExportTables(bool allowLossyProjection = false, int maxRows = 100000, int maxCells = 2000000, CancellationToken cancellationToken = default)` [#](#method-exporttables-boolean-int32-int32-threading-cancellationtoken)

[ProjectDocument.DataExport.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.DataExport.cs#L6)

Projects stored task/resource/assignment/calendar fields into four mapped tables. This deliberately omits dependencies, advanced scheduling data and native/source payloads; inspect Notices before using it as an interchange format.

Parameters

**allowLossyProjection bool = false optional**

**maxRows int = 100000 optional**

**maxCells int = 2000000 optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDataExportResult`

`public ProjectOutlineCodeDefinition? GetCustomFieldLookupTable(ProjectCustomFieldDefinition definition)` [#](#method-getcustomfieldlookuptable-officeimo-project-projectcustomfielddefinition)

[ProjectDocument.CustomFieldLookups.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.CustomFieldLookups.cs#L8)

Returns a field's shared lookup table selected by Ltuid; null means the field uses no shared table.

Parameters

**definition OfficeIMO.Project.ProjectCustomFieldDefinition required**

Returns

`ProjectOutlineCodeDefinition?`

`public string? GetOutlineCodeText(ProjectEntity entity, string fieldId)` [#](#method-getoutlinecodetext-officeimo-project-projectentity-string)

[ProjectDocument.OutlineCodes.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.OutlineCodes.cs#L8)

Resolves a task or resource outline-code selection to its masked hierarchical text; returns null when unassigned.

Parameters

**entity OfficeIMO.Project.ProjectEntity required**

**fieldId string required**

Returns

`string?`

`public static ProjectDataImportResult ImportTables(IEnumerable<ProjectMappedTable> tables, ProjectDataImportOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-importtables-collections-generic-ienumerable-officeimo-project-projectmappedtable-officeimo-project-projectdataimportoptions-threading-cancellationtoken)

[ProjectDocument.DataImport.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.DataImport.cs#L8)

Imports explicitly mapped tables into a new document, preserving UIDs. Duplicate identities, missing required values, cycles, malformed values and dangling references reject the entire import.

Parameters

**tables System.Collections.Generic.IEnumerable<OfficeIMO.Project.ProjectMappedTable> required**

**options OfficeIMO.Project.ProjectDataImportOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDataImportResult`

Load 2 overloads

`public static ProjectDocument Load(string path, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-load-string-officeimo-project-projectloadoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L59)

Loads bounded XML or a qualified MPP14 document without calculating its schedule.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDocument`

`public static ProjectDocument Load(Stream stream, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-load-io-stream-officeimo-project-projectloadoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L71)

Loads a caller-owned stream. Seekable input is read from the start and its position is restored.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDocument`

LoadAsync 2 overloads

`public static async Task<ProjectDocument> LoadAsync(string path, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-loadasync-string-officeimo-project-projectloadoptions-threading-cancellationtoken)

Asynchronously reads a file, then parses XML or qualified native input with cancellation and structural limits.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<ProjectDocument>`

`public static async Task<ProjectDocument> LoadAsync(Stream stream, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-loadasync-io-stream-officeimo-project-projectloadoptions-threading-cancellationtoken)

Asynchronously reads caller-owned input while preserving seekable stream position.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<ProjectDocument>`

`public void NormalizeDisplayIds()` [#](#method-normalizedisplayids)

[ProjectDocument.DisplayOrder.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.DisplayOrder.cs#L6)

Assigns native display IDs in current outline/resource order, preserving reserved UID-zero rows.

`public static ProjectDocument Parse(string xml, ProjectLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-parse-string-officeimo-project-projectloadoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L37)

Parses a Project XML string with bounded, DTD-disabled parsing.

Parameters

**xml string required**

**options OfficeIMO.Project.ProjectLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectDocument`

`public ProjectScheduleResult Recalculate(ProjectScheduleOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-recalculate-officeimo-project-projectscheduleoptions-threading-cancellationtoken)

[ProjectDocument.Scheduling.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Scheduling.cs#L73)

Calculates and explicitly applies task dates. Throws before mutation when calculation reports errors.

Parameters

**options OfficeIMO.Project.ProjectScheduleOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectScheduleResult`

Save 3 overloads

`public void Save(ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-save-officeimo-project-projectsaveoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:120](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L120)

Saves to the associated file or seekable stream.

Parameters

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void Save(string path, ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-save-string-officeimo-project-projectsaveoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:128](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L128)

Atomically saves to the format selected by the extension and associates the document with that path after success.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

`public void Save(Stream stream, ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-save-io-stream-officeimo-project-projectsaveoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:139](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L139)

Saves to a caller-owned stream. Seekable streams are replaced; non-seekable streams receive bytes at their current position.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

SaveAsync 2 overloads

`public async Task SaveAsync(string path, ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-saveasync-string-officeimo-project-projectsaveoptions-threading-cancellationtoken)

Asynchronously commits a complete Project file after validation and serialization.

Parameters

**path string required**

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

`public async Task SaveAsync(Stream stream, ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-saveasync-io-stream-officeimo-project-projectsaveoptions-threading-cancellationtoken)

Asynchronously writes the selected format to a caller-owned stream without replacing an existing destination association; failure may leave a partial destination.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task`

SetCustomFieldLookupValue 2 overloads

`public void SetCustomFieldLookupValue(ProjectEntity entity, ProjectCustomFieldDefinition definition, ProjectOutlineCodeLookupValue lookup)` [#](#method-setcustomfieldlookupvalue-officeimo-project-projectentity-officeimo-project-projectcustomfielddefinition-officeimo-project-projectoutlinecodelookupvalue)

[ProjectDocument.CustomFieldLookups.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.CustomFieldLookups.cs#L20)

Assigns a flat shared lookup entry to a scalar task or resource field, retaining its value and identity.

Parameters

**entity OfficeIMO.Project.ProjectEntity required**

**definition OfficeIMO.Project.ProjectCustomFieldDefinition required**

**lookup OfficeIMO.Project.ProjectOutlineCodeLookupValue required**

`public void SetCustomFieldLookupValue(ProjectEntity entity, ProjectCustomFieldDefinition definition, ProjectLookupValue lookup)` [#](#method-setcustomfieldlookupvalue-officeimo-project-projectentity-officeimo-project-projectcustomfielddefinition-officeimo-project-projectlookupvalue)

[ProjectDocument.CustomFieldLookups.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.CustomFieldLookups.cs#L43)

Assigns a modeled lookup entry to a qualified scalar task or resource field, retaining its value and lookup identity.

Parameters

**entity OfficeIMO.Project.ProjectEntity required**

**definition OfficeIMO.Project.ProjectCustomFieldDefinition required**

**lookup OfficeIMO.Project.ProjectLookupValue required**

`public void SetOutlineCodeValue(ProjectEntity entity, string fieldId, ProjectOutlineCodeLookupValue value)` [#](#method-setoutlinecodevalue-officeimo-project-projectentity-string-officeimo-project-projectoutlinecodelookupvalue)

[ProjectDocument.OutlineCodes.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.OutlineCodes.cs#L18)

Assigns a hierarchical lookup value to a task or resource outline-code field, validating masks and selection restrictions before mutation.

Parameters

**entity OfficeIMO.Project.ProjectEntity required**

**fieldId string required**

**value OfficeIMO.Project.ProjectOutlineCodeLookupValue required**

`public ProjectDocument StandardWorkingWeek(string name = "Standard")` [#](#method-standardworkingweek-string)

[ProjectDocument.Authoring.cs:13](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Authoring.cs#L13)

Creates and assigns an explicit standard working-week calendar.

Parameters

**name string = "Standard" optional**

Returns

`ProjectDocument`

`public ProjectDocument StartsOn(DateTime date)` [#](#method-startson-datetime)

[ProjectDocument.Authoring.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Authoring.cs#L10)

Sets the local start date and forward-scheduling input without running the scheduler.

Parameters

**date System.DateTime required**

Returns

`ProjectDocument`

`public string ToXml(ProjectSaveOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-toxml-officeimo-project-projectsaveoptions-threading-cancellationtoken)

[ProjectDocument.Lifecycle.cs:111](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Lifecycle.cs#L111)

Serializes to XML text; no destination is rebound and the document remains modified.

Parameters

**options OfficeIMO.Project.ProjectSaveOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`string`

`public ProjectReport Validate(CancellationToken cancellationToken = default)` [#](#method-validate-threading-cancellationtoken)

[ProjectDocument.Validation.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.Validation.cs#L6)

Validates identities, relationships, values, and preservation risk without calculating or writing.

Parameters

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`ProjectReport`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public ProjectNativeInfo? NativeInfo { get; }` [#](#property-nativeinfo)

[ProjectDocument.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L23)

Native source generation and inert container inventory; null for XML/new documents.

`public string? Name { get; set; }` [#](#property-name)

[ProjectDocument.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L52)

Project name, separate from the associated file path.

`public string? Title { get; set; }` [#](#property-title)

[ProjectDocument.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L54)

Document title.

`public string? Author { get; set; }` [#](#property-author)

[ProjectDocument.cs:56](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L56)

Document author. No machine identity is supplied automatically.

`public string? Subject { get; set; }` [#](#property-subject)

[ProjectDocument.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L58)

Document subject.

`public string? Company { get; set; }` [#](#property-company)

[ProjectDocument.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L60)

Organization metadata.

`public string? Manager { get; set; }` [#](#property-manager)

[ProjectDocument.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L62)

Project manager metadata.

`public Guid? Guid { get; set; }` [#](#property-guid)

[ProjectDocument.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L64)

Optional project GUID.

`public ProjectSettings Settings { get; }` [#](#property-settings)

[ProjectDocument.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L66)

Document settings and project calendar reference.

`public ProjectCalendar? Calendar { get; set; }` [#](#property-calendar)

[ProjectDocument.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L68)

Convenience access to the project's explicit calendar.

`public ProjectTaskCollection Tasks { get; }` [#](#property-tasks)

[ProjectDocument.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L70)

Top-level tasks in outline order. Use AllTasks for a flat traversal.

`public IEnumerable<ProjectTask> AllTasks { get; }` [#](#property-alltasks)

[ProjectDocument.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L72)

All tasks in outline order, including project summaries and placeholders from source.

`public ProjectResourceCollection Resources { get; }` [#](#property-resources)

[ProjectDocument.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L74)

Resources.

`public ProjectCalendarCollection Calendars { get; }` [#](#property-calendars)

[ProjectDocument.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L76)

Base and derived calendars.

`public ProjectAssignmentCollection Assignments { get; }` [#](#property-assignments)

[ProjectDocument.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L78)

Task-resource assignments.

`public ProjectDependencyCollection Dependencies { get; }` [#](#property-dependencies)

[ProjectDocument.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L80)

Predecessor relationships.

`public ProjectCollection<ProjectCustomFieldDefinition> CustomFields { get; }` [#](#property-customfields)

[ProjectDocument.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L82)

Project-wide custom-field definitions.

`public ProjectCollection<ProjectOutlineCodeDefinition> OutlineCodes { get; }` [#](#property-outlinecodes)

[ProjectDocument.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L84)

Hierarchical lookup tables and masks referenced by outline-code fields.

`public long Revision { get; private set; }` [#](#property-revision)

[ProjectDocument.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L86)

Current mutation revision; no calculation is implied.

`public bool IsModified { get; }` [#](#property-ismodified)

[ProjectDocument.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L88)

True when edits have not been saved to an associated destination.

`public bool IsScheduleStale { get; private set; }` [#](#property-isschedulestale)

[ProjectDocument.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L90)

True when schedule-affecting changes have been made without an explicit calculation.

`public bool AreWorkCostTotalsStale { get; private set; }` [#](#property-areworkcosttotalsstale)

[ProjectDocument.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L92)

True after edits that can affect stored work/cost totals. Applying task dates does not recalculate those totals.

`public int? SourceSaveVersion { get; }` [#](#property-sourcesaveversion)

[ProjectDocument.cs:94](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L94)

The input's SaveVersion, if declared. This is not an MPP write capability.

`public string XmlNamespace { get; }` [#](#property-xmlnamespace)

[ProjectDocument.cs:96](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L96)

Source XML namespace, or the native Project XML namespace for a new document.

`public IReadOnlyList<ProjectDiagnostic> ReadDiagnostics { get; }` [#](#property-readdiagnostics)

[ProjectDocument.cs:98](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Project/ProjectDocument.cs#L98)

Findings collected during input parsing, without exposing mutable XML.

<!-- PowerForge markdown artifact sha256:41D66C7F2ACFD4111445C55F7308F5D6953F290DA3E433998EB277BD375108B9 -->
