Forge.Sync 1.20.0

dotnet add package Forge.Sync --version 1.20.0
                    
NuGet\Install-Package Forge.Sync -Version 1.20.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Forge.Sync" Version="1.20.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Forge.Sync" Version="1.20.0" />
                    
Directory.Packages.props
<PackageReference Include="Forge.Sync" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Forge.Sync --version 1.20.0
                    
#r "nuget: Forge.Sync, 1.20.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Forge.Sync@1.20.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Forge.Sync&version=1.20.0
                    
Install as a Cake Addin
#tool nuget:?package=Forge.Sync&version=1.20.0
                    
Install as a Cake Tool

Forge.Sync

Compile-time desired-state reconciliation for .NET 10.

Forge.Sync turns current and desired keyed state into an explicit reconciliation plan while leaving persistence, transports, workflow policy, and execution in your application.

Installing Forge.Sync also brings in Forge.Delta.

Install

dotnet add package Forge.Sync

Quick start

using Forge.Sync;

[GenerateSync(nameof(OrderItem.Id))]
public sealed record OrderItem(
    string Id,
    string Product,
    int Quantity);

var plan = OrderItemSync.Plan(current, desired);

plan.Added;
plan.Updated;
plan.Removed;
plan.Unchanged;

Every update carries a strongly typed generated Delta:

foreach (var update in plan.Updated)
{
    foreach (var change in update.Delta.Changes)
    {
        Console.WriteLine($"{update.Key}: {change.Path}: {change.Before} -> {change.After}");
    }
}

Replace and partial Upsert

Complete desired state is the default:

var replace = OrderItemSync.Plan(current, desired);

For partial input where omitted current items must survive:

var upsert = OrderItemSync.Plan(current, payload, SyncMode.Upsert);

upsert.Preserved;

The distinction is explicit so a partial patch cannot accidentally become a deletion plan.

More than same-type collections

Forge.Sync also supports:

  • nested keyed reconciliation with [SyncNested];
  • current and desired values with different CLR types;
  • ordered fallback identities such as instance ID first, business ID second;
  • dependency planning and cycle detection;
  • typed operation classification;
  • ordered streaming reconciliation with IAsyncEnumerable<T>;
  • node/edge topology reconciliation;
  • reversible Replace plans;
  • portable manifests, canonical plan digests, stale-plan checks, and batch composition.

Boundary

Forge calculates and explains the transition. It does not persist data, call external systems, publish events, or decide application-specific business policy.

Runtime characteristics

  • .NET 10
  • source-generated
  • Native AOT and trimming friendly
  • no runtime reflection in generated reconciliation paths
  • no mandatory DI
  • no infrastructure dependency

Planning beyond structural reconciliation

Forge.Sync 1.8 also includes:

  • structured plan explanations;
  • source-generated cross-type profiles;
  • ordered Delta-aware operation rules;
  • incremental semantic replanning with stable application-owned operation IDs;
  • graph impact analysis;
  • typed pre-execution plan constraints;
  • portable plan simulation with stale-plan protection.

These features remain planning primitives: Forge still performs no persistence or external execution.

Typed planning through 1.20

Forge.Sync 1.20 adds typed conditional dependencies, readiness, safe slices, provenance, plan-to-plan Delta, execution-aware replanning, approval scopes, alternative plans, typed derived facts, lazy scenario matrices, source-generated plan templates, and composite topology invariants.

The application retains its own identity/state/fact/scope/reason types; Forge does not require string registries, reflection-driven rule discovery, or an execution engine.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.20.0 118 9/27/2026

Forge.Sync 1.20.0: typed composite topology transitions with cross-topology invariants and dependency ordering.