Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Parallel dependency network

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.

Start with
A fork-and-join dependency graph
Generate
XML + PNG + SVG + PDF
Parallel dependency network generated from the linked C# example
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

This is the complete example file used to generate the download. The walkthrough runner creates the output directory and produces the additional previews.

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.ExportImages(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

Run it from the source checkout

Clone the OfficeIMO repository and run this command from its root with the .NET 10 SDK. The first run restores the example project's dependencies.

dotnet run --project OfficeIMO.Examples -f net10.0 -- --showcase-workflows --showcase-example project-dependency-network

The files are written to OfficeIMO.Examples/bin/Debug/net10.0/Documents/Workflows/project-dependency-network/. To use the example in your application, start with the Project guide and its package setup.

Downloads 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 · Artifact hashes and provenance

Continue with another example

Example source

Download source