Inno.Build.Toolchains
Section titled “Inno.Build.Toolchains”
- Neutral SDK facts, frozen execution inputs, immutable publications and registered cache ownership.
Neutral SDK facts, frozen execution inputs, immutable publications and registered cache ownership.
Read the linked task or ownership explanation before using the exact API below.
Choose the owning mechanism
Section titled “Choose the owning mechanism”Read artifact and cache ownership for readers, content identities and retirement, Native preparation for recipes and deployment, and Task-host isolation for MSBuild loading. This library does not select a product by probing the current OS or maintain another backend list.
SDK graphs and frozen inputs
Section titled “SDK graphs and frozen inputs”ManagedProjectGraphCapture batches absolute project paths in the explicitly selected SDK, using the same ProjectGraph entry instances for roots and references. Conditional global-property variants remain distinct. Explicit reference resolution consumes properly restored outputs without Build or Native targets, even when a project treats reference-build properties as local. Missing evaluator tooling can be prepared under its own immutable owner; the captured graph is not compilation evidence.
ManagedBuildInputSnapshot records actual Compile/resources/analyzers/additional input/import/package/reference-pack/SDK options and final implicit symbols. Verification reevaluates and reads complete current contents, including additions and preserved-timestamp changes. Platform-qualified TFMs retain identity while reference packs follow the SDK’s framework model. Frozen execution copies only declared source, preserves identical timestamps and retires obsolete owned inputs; external SDK/package locations remain explicit.
Source aliases deduplicate physical reads within a phase while retaining logical checkout identities. macOS aliases and Windows junctions do not turn source into arbitrary external SDK input. Canonical ordering makes equivalent project variants stable; semantic argument/include/source order remains significant.
Process and product lifetime
Section titled “Process and product lifetime”ToolchainEnvironment returns full captured output or retains SDK diagnostics/exit failure. Cancellation terminates and drains the owned process tree. DotNetSdkEnvironment changes only the child environment, preserving selected Native configuration and removing inherited resolver redirection.
Product results own their complete Native/binding leases. Neutral preparation descriptions enable valid same-root reuse, but every consumer independently acquires protection and verifies fresh inputs/output. Static aggregate or unowned-generation cases cannot pretend to have registered-reader protection.
Register and retire safely
Section titled “Register and retire safely”Publishers declare explicit physical owners, coordination leases, roles, current roots and dependencies. Temporary claims precede payload writes. Immutable artifacts, reusable workspaces and process workspaces have different lifetime rules; registered dependencies never authorize a new arbitrary path. Active or unknown owners remain protected.
BuildCacheCleanupPlan uses one proposal for preview/execution, then rechecks ownership, roots, dependencies, members and readers under locks before retirement. Resumable size shards are not persisted retirement authorization, and dry-run cannot update them. Logical retired bytes are separate from measured physical free space. Invalid or incomplete protection metadata keeps cleanup visibly unsuccessful while retaining any actual completed retirement diagnostics.
NativeArtifactTransfer carries only immutable payloads/manifests. Import verifies complete paths, membership and hashes in an owned temporary scope before adoption; it transports no PID, lease, writable obj or absolute owner state. Artifact export is not test evidence.
Host usage
Section titled “Host usage”Supply existing live dependencies. This example checks the host contract; it does not initialize a complete product or certify a physical device.
using System.Collections.Generic;using System.Threading;using System.Threading.Tasks;using Inno.Build.Toolchains;
public static class HostExample1{ static ValueTask<BuildCacheCleanupResult> RetireUnused( string checkout, IReadOnlyList<BuildCacheOwnerDescriptor> owners, CancellationToken cancellation ) { BuildCacheCleanupPlan plan = BuildCacheCleanupPlan.Create( checkout, owners, new BuildCachePolicy(), cancellationToken: cancellation); return plan.ExecuteAsync(cancellationToken: cancellation); }}using System.Threading;using System.Threading.Tasks;using System.Collections.Generic;using Inno.Build.Toolchains;
public static class HostExample2{ static Task<ProductNativeBuildResult> Prepare( ProductNativeBuildPlan plan, NativeBuildContext selected, CancellationToken cancellation ) { return new ComponentNativeProductExecutor().BuildAsync(selected, plan, cancellation); }}Source boundary
Section titled “Source boundary”The source project defines the selected host declarations. Script projection and platform execution require their separate evidence.
API reference
Section titled “API reference”Source project facts
Section titled “Source project facts”Project: Inno.Build.Toolchains
Source: build/toolchains/Inno.Build.Toolchains/Inno.Build.Toolchains.csproj
| Type | API | Description |
|---|---|---|
| BackendPrebuiltArchive | engine | Transfers the certified files for one backend target. Each archive contains exactly one current inventory. |
| BuildArtifactCopier | engine | Copies filtered native outputs into the engine’s rebuildable dependency store. |
| BuildArtifactManifest | engine | Validates complete build outputs against their input identity and recorded file hashes. |
| BuildArtifactOptions | engine | Defines the deterministic filter and naming policy used to collect one native product. |
| BuildArtifactReadLease | engine | Pins a verified immutable build artifact against cooperating repair and retirement operations. |
| BuildArtifactWriteLease | engine | Coordinates artifact replacement or retirement with every cooperating reader and writer. |
| BuildCacheArtifactDescriptor | engine | Freezes one publisher-owned cache entry and the generations it requires. |
| BuildCacheArtifactRole | engine | Declares the producer’s file lifetime independently of target identity and directory naming. |
| BuildCacheCleanupPlan | engine | Freezes a reviewable retirement proposal for explicitly registered cache owners in one checkout. |
| BuildCacheCleanupResult | engine | Reports completed retirement independently from protected, active and failed artifacts. |
| BuildCacheOwnerCatalog | engine | Persists explicit publisher registrations for maintenance without loading the production distribution. |
| BuildCacheOwnerDescriptor | engine | Registers a publisher’s exact cache boundary and its current artifact ownership inventory. |
| BuildCachePolicy | engine | Defines bounded retirement pressure without allowing active or current generations to be removed. |
| BuildCachePublisher | engine | Records exact publisher-owned generations and coordinates them with bounded cache retirement. |
| BuildHostDescriptor | engine | Identifies the tool execution machine without selecting any product target. |
| BuildHostServices | engine | Freezes host execution capabilities independently of a product target SDK. |
| BuildMaintenanceApplication | engine | Runs publisher-owned cache maintenance without backend, generator or Editor dependencies. |
| ComponentNativeProductExecutor | engine | Executes portable component producers in their declared dependency order. |
| DotNetSdkDescriptor | engine | Freezes the host, SDK identity and managed CLI entry selected by one managed entry project. |
| DotNetSdkEnvironment | engine | Isolates a managed tool invocation from the invoking IDE’s SDK and MSBuild process identity. |
| DotNetSdkResolver | engine | Resolves the managed SDK using the prepared entry project’s directory and normal global.json rules. |
| IBuildHostProvider | engine | Discovers one explicitly registered host implementation. |
| INativeBindingGenerator | engine | Prepares an entire binding closure without coupling native recipes to a generator or build host. |
| INativeProductExecutor | engine | Executes an explicitly selected native product graph without target discovery. |
| INativeToolchainProvider | engine | Resolves one platform’s SDK for an explicit target on a declared tool execution host. |
| IToolchainWorkspaceProvider | engine | Owns the relationship between physical build storage and host tool execution paths. |
| ManagedBuildExecution | engine | Owns a reusable, exclusively leased source workspace containing verified copies of an operation’s inputs. |
| ManagedBuildInputSnapshot | engine | Freezes the selected SDK’s evaluated managed source graph without compiling a product. |
| ManagedProjectGraphCapture | engine | Evaluates repository project inputs in one selected SDK process without executing project targets. |
| NativeArtifact | engine | Identifies one exact output and its producer-declared role. |
| NativeArtifactPublisher | engine | Publishes complete native products by source and toolchain identity under process-shared ownership. |
| NativeArtifactRole | engine | Describes the link or deployment role explicitly assigned by a native producer. |
| NativeArtifactTransfer | engine | Transports verified native payloads without copying publisher registrations, leases or writable workspaces. |
| NativeBindingCompilation | engine | Describes a selected component’s native requirements independently of its source generator. |
| NativeBindingGenerationDescriptor | engine | Describes the complete binding generation selected by one native build request. |
| NativeBindingGenerationRequest | engine | Freezes the complete binding request before ownership waits or candidate creation. |
| NativeBindingGenerationResult | engine | Owns the reading protection of a complete binding closure until its final compiler consumer finishes. |
| NativeBindingIncludeDirectory | engine | Preserves the order and search semantics of one native include requirement. |
| NativeBindingOutputMode | engine | Selects the publication owner of generated sources. |
| NativeBindingPreparation | engine | Prepares a coherent target closure through the borrowed generator, without invoking MSBuild. |
| NativeBindingSourceFile | engine | Identifies exact generated or external bytes needed by a native compilation. |
| NativeBindingSourceRoot | engine | Identifies one component-local root without exposing a generator-specific contract. |
| NativeBuildContext | engine | Identifies the checkout, configuration and frozen initial inputs owned by one native build operation. Create a new context for each operation; changes during its lifetime fail stability verification. |
| NativeBuildFingerprint | engine | Derives recipe identities from ordered declarations, logical input names and complete source bytes. |
| NativeBuildInput | engine | Separates the reproducible identity of an input from its physical reading location. |
| NativeBuildPhaseStatistics | engine | Describes actual full reads and physical read reuse within one explicitly bounded input phase. |
| NativeBuildProduct | engine | Identifies one complete, integrity-checked native artifact and its exact published file closure. |
| NativeBuildRecipe | engine | Freezes a component’s input closure, ordered tool selection and intermediate owner. |
| NativeBuildStatistics | engine | Reports actual input reading and compiler process work accumulated by one build context. |
| NativeCMakeExecutor | engine | Executes component-owned CMake definitions using an already frozen target SDK selection. |
| NativeCMakeSource | engine | Describes copied recipe inputs owned by one cold CMake producer. External SDK locations remain assigned to the frozen toolchain. |
| NativeCompilerInputs | engine | Freezes SDK-resolved native compiler and header inputs without interpreting environment conventions. |
| NativeComponentBuildOptions | engine | Freezes product-owned linkage, ordered component definitions and their configuration inputs. |
| NativeComponentDescriptor | engine | Declares the unique source and build owners of a reusable native component. |
| NativeDependencyAsset | engine | Identifies one immutable native archive selected for a backend product closure. |
| NativeDependencyManifest | engine | Transfers aggregate native products and their exact binding generations through the dependency selection protocol. Publishes exact native dependency selections and acquires their immutable payloads without invoking producers. |
| NativeDeploymentMetadataFactory | engine | Creates explicitly selected deployment metadata from a frozen Native closure. |
| NativeInputMaterializer | engine | Materializes frozen native inputs without rewriting identical intermediate files. |
| NativeLibraryKind | engine | Specifies the linkage required by a product’s native component operation. |
| NativeLinkPlan | engine | Freezes platform library formats and linker configuration independently of component recipes. |
| NativeStaticBuildDefinition | engine | Declares a backend-owned static-library recipe and its complete checkout input closure. |
| NativeToolchainPreparation | engine | Supplies shared environment isolation and SDK input validation without selecting a platform. |
| NativeToolchainSelection | engine | Freezes target compiler tools and SDK inputs independently of discovery and platform policy. |
| PhysicalToolchainWorkspaceProvider | engine | Executes tools directly in their physical owner directory. |
| ProductNativeBuildPlan | engine | Executes a frozen product closure with one target toolchain and no implicit backend selection. |
| ProductNativeBuildResult | engine | Owns a complete ordered Native product closure and releases its reading leases together. |
| ProductNativeBuildStep | engine | Binds one product component to an owned build operation and explicit deployment layout. |
| ProductNativeDeployment | engine | Materializes an explicitly built host-native closure into one application’s deployment directory. |
| ProductNativePreparation | engine | Transfers completed native preparation across private task loads using neutral data and independent consumer leases. |
| ToolchainEnvironment | engine | Provides deterministic host-process and workspace operations shared by native dependency toolchains. |
| ToolchainLayout | engine | Defines stable repository-relative names shared by native dependency toolchains. |
| ToolchainWorkingDirectory | engine | Retains a provider-owned tool execution path until all dependent processes finish. |