# Parallel dependency network

Render a dependency network in C# with parallel task lanes, progress, and cross-task references. Export the calculated release plan to PDF, SVG, and PNG.

Project · C# walkthrough

Explain which work can proceed in parallel and which tasks must join before a release can move forward. The same task model supplies the dates, critical status, and diagram references.

[Build this report](#example-code)[Download Project XML](/downloads/showcase/workflows/project-dependency-network/example.xml) [Try this file in your browser](/browser/hidden-characters/)

Opens the generated download in a local browser tool. The C# example below creates the document.

**Start with**

A fork-and-join dependency graph

**Generate**

XML + PNG + SVG + PDF

[!\[Parallel dependency network generated from the linked C# example\](/downloads/showcase/workflows/project-dependency-network/preview.webp)](/downloads/showcase/workflows/project-dependency-network/preview.png)

Calculated report · Generated by the example below

## How it works

1. ### Define parallel work
  
  Add API design, interface design, and migration planning after discovery, then join the delivery paths before acceptance and release.
2. ### Calculate dependency stages
  
  Calculate the schedule and create a dependency network. The Project renderer places stages in columns and parallel work in separate lanes.
3. ### Export a zoomable diagram
  
  Use a 300-DPI PNG for fixed-size sharing, SVG for vector zoom, and PDF for review or printing. Save the calculated project as XML too.

## The C# source

The example below shows the document API and layout used for this report. Follow the Project guide for package setup in your own project.

```csharp
using OfficeIMO.Drawing;
using OfficeIMO.Project;
using OfficeIMO.Workflows;

namespace OfficeIMO.Examples.Showcase.Workflows;

/// <summary>Shows parallel work, dependency joins, and task status in a network report.</summary>
internal static class ProjectDependencyNetwork {
    internal static void Create(string folder) {
        using var project = ProjectDocument.Create();
        project.Name = "Platform release / dependency map";
        project.Calendar = project.Calendars.AddStandardWorkingWeek();
        project.Settings.StartDate = new DateTime(2026, 10, 5, 8, 0, 0);
        string[] names = { "Discovery", "API design", "Interface design", "Migration plan", "Build and integrate", "Migration rehearsal", "Acceptance", "Release" };
        var tasks = names.Select((name, index) => {
            var task = project.Tasks.Add(name);
            task.Duration = ProjectDuration.WorkingDays(index == 7 ? 0 : index == 4 ? 4 : 2);
            return task;
        }).ToArray();
        foreach (var (from, to) in new[] { (0, 1), (0, 2), (0, 3), (1, 4), (2, 4), (3, 5), (4, 6), (5, 6), (6, 7) })
            project.Dependencies.Add(tasks[from], tasks[to]);
        tasks[0].ActualStart = project.Settings.StartDate;
        tasks[0].ActualDuration = ProjectDuration.WorkingHours(16);
        tasks[0].RemainingDuration = ProjectDuration.WorkingHours(0);
        tasks[1].ActualStart = new DateTime(2026, 10, 7, 8, 0, 0);
        tasks[1].ActualDuration = ProjectDuration.WorkingHours(8);
        tasks[1].RemainingDuration = ProjectDuration.WorkingHours(8);

        var schedule = project.CalculateSchedule(new ProjectScheduleOptions { CalculateAssignments = true });
        schedule.Report.ThrowIfErrors();
        var view = project.CreateView(schedule, new ProjectViewOptions {
            Kind = ProjectViewKind.Network, NetworkLayout = ProjectNetworkLayout.Dependency,
            PageWidth = 1600, PageHeight = 900
        });
        project.ApplySchedule(schedule);
        project.Save(Path.Combine(folder, "example.xml"));

        string fonts = Path.Combine(AppContext.BaseDirectory, "Assets", "Fonts");
        var faces = new OfficeFontFaceCollection()
            .Add("Arial", File.ReadAllBytes(Path.Combine(fonts, "Carlito-Regular.ttf")))
            .Add("Arial", File.ReadAllBytes(Path.Combine(fonts, "Carlito-Bold.ttf")), OfficeFontStyle.Bold);
        var typography = new OfficeRenderingProfile("network-report", faces, OfficeManagedTextShapingProvider.Instance);
        var images = new ProjectImageExportOptions().UseRenderingProfile(typography).UseQuality(OfficeImageExportQuality.Print);
        File.WriteAllBytes(Path.Combine(folder, "preview.png"), ProjectReportWorkflow.ToImages(view, options: images).Single().Bytes);
        File.WriteAllText(Path.Combine(folder, "preview.svg"), ProjectReportWorkflow.ToSvg(view, typography).Single());
        File.WriteAllBytes(Path.Combine(folder, "preview.pdf"), ProjectReportWorkflow.ToPdf(view, typography: typography));
    }
}
```

[Open the C# source file](/downloads/showcase/workflows/project-dependency-network/ProjectDependencyNetwork.cs.txt)

## API used in this example

- [`ProjectDuration`](/api/project/officeimo-project-projectduration/)
- [`ProjectReportWorkflow`](/api/workflows/officeimo-workflows-projectreportworkflow/)
- [`OfficeFontFaceCollection`](/api/core/officeimo-drawing-officefontfacecollection/)
- [`OfficeFontStyle`](/api/core/officeimo-drawing-officefontstyle/)
- [`OfficeImageExportQuality`](/api/core/officeimo-drawing-officeimageexportquality/)
- [`OfficeManagedTextShapingProvider`](/api/core/officeimo-drawing-officemanagedtextshapingprovider/)
- [`OfficeRenderingProfile`](/api/core/officeimo-drawing-officerenderingprofile/)
- [`ProjectDocument`](/api/project/officeimo-project-projectdocument/)
- [`ProjectImageExportOptions`](/api/workflows/officeimo-workflows-projectimageexportoptions/)
- [`ProjectNetworkLayout`](/api/project/officeimo-project-projectnetworklayout/)
- [`ProjectScheduleOptions`](/api/project/officeimo-project-projectscheduleoptions/)
- [`ProjectViewKind`](/api/project/officeimo-project-projectviewkind/)
- [`ProjectViewOptions`](/api/project/officeimo-project-projectviewoptions/)

## Use this in your project

Change the dependency pairs to match your workflow. For larger graphs, consume every exported page instead of Single(); continuation references identify the linked task page.

The [Project guide](/docs/project/) explains package setup and related document APIs.

## Documents and scope

### What the preview shows

The complete C# example generates these exports. The runner reopens and validates the Project XML and any Office documents, and verifies the PDF page count. The preview is the actual 300-DPI PNG export.

### What to keep in mind

Calculated report views do not reconstruct saved native Project view styles. Charts in Word and PowerPoint are images; accompanying data tables remain editable. PNG has a fixed pixel resolution; use SVG for vector zoom.

[Project API reference](/docs/project/#api-entry-points) · [Artifact hashes and provenance](/downloads/showcase/manifest.json)

## Continue with another example

- [Project**Delivery Gantt with progress**](/showcase/project-delivery-gantt/)
- [Project**Release milestone timeline**](/showcase/project-milestone-timeline/)

<!-- PowerForge markdown artifact sha256:EBDE079E31CEA0712A5437A49838AE8279E01913B42E5A35725362EF70EE1B36 -->
