Skip to main content

Old-to-new API lookup

Use this page to look up a V3 API or a compiler error. Each row points at the most common replacement. The linked pages have the details.

These are symbol-scoped replacements, not global find-and-replace rules. Check that a match really is the ModularPipelines symbol before you change it.

Common compiler errors​

SymptomLikely fix
Configure: no suitable method to overrideUse protected override void Configure(ModuleConfigurationBuilder module)
ModuleConfiguration.Create / .Build unavailableUse the supplied configuration builder
Init-only option assignment failsUse ConfigureOptions and nested with expressions
IServiceCollection has no AddModuleRegister on the PipelineBuilder
PipelineBuilder has no BuildAwait BuildAsync, or use RunAsync
Module override/result has a nullability mismatchChoose Module<T> + Task<T> or explicit Module<T?> + Task<T?>
IModuleContext / Module<T> / CommandResult not found in old namespaceImport ModularPipelines
DotNet tool property unavailableImport ModularPipelines.Context; check integration reference, C# 14 support and generator execution, or use Tools.Get<IDotNet>()
A command rejects named argument tokenUse cancellationToken on that framework call
CommandLogVerbosity has no MinimalUse InputOnly for command input only, or another level for the output you need
MPG0018 or missing command metadata at runtimeRebuild the declaring assembly with the V4 generator; retain analyzer assets
Missing generated option or incompatible property typeInspect the current options type and tool grammar; update the call site
Handler method does not implement the interface memberAdd the trailing CancellationToken parameter; rename Priority to Order
IModularPipelinesPlugin members not implementedReplace ConfigureServices/ConfigurePipeline with Configure(PipelineBuilder builder)
Cannot derive from a sealed DependsOnAttribute or implement IModuleDeclare dependencies in Configure(module); derive modules from Module<T>

Builder and options​

Details: Entry point and options.

V3 APIV4 APICheck
PipelineBuilderOptionsPipelineBuilderSettingsImmutable record; set properties in the initializer
builder.Services.AddModule<T>()builder.AddModule<T>()ModularPipelines registration extensions only. Preserve conditional registration and factories
Both builder.ConfigureServices(...) overloadsRegister directly on builder.ServicesUse the builder variable for registrations that need it
builder.Build()await builder.BuildAsync()Dispose the pipeline with await using
builder.ExecutePipelineAsync()builder.RunAsync()Await completion
builder.Options.X = valuebuilder.ConfigureOptions(o => o with { X = value })Nested settings moved
ExecutionMode.StopOnFirstExceptionFailureMode.FailFast
ExecutionMode.WaitForAllModulesFailureMode.ContinueOnFailure
PluginRegistry.Register(plugin)builder.AddPlugin(plugin)Merge ConfigureServices and ConfigurePipeline into Configure(PipelineBuilder)
IPipelineValidator.ValidateValidateAsync(services, cancellationToken)Return Task<ValidationResult>

Modules​

Details: Modules.

V3 APIV4 APICheck
Configure(): ModuleConfigurationConfigure(ModuleConfigurationBuilder): voidRemove Create and Build; preserve inherited configuration
DeclareDependencies(...)Dependencies in Configure(module)Keep required/optional/conditional distinctions
DependsOnLazy<T>()DependsOnOptional<T>()Same scheduling behavior
WithRetryCount / WithRetryPolicyWithRetry / WithShieldPreserve policy semantics; review delays and exception filters
WithTimeout(TimeSpan.Zero)WithTimeout(Timeout.InfiniteTimeSpan)Zero now throws
Module<T> returning Task<T?>Task<T>, or explicitly Module<T?>Decide whether null is valid
ExecuteModuleAsync / ExecuteModuleExecuteAsync / ExecuteNon-generic module overrides only
context.SubModule(...)context.RunSubModuleAsync(name, token => ..., cancellationToken)Forward the body token

Results and summaries​

Details: Results and summaries.

V3 APIV4 APICheck
Result IsSuccess / IsFailure / IsSkippedTyped variants or safe accessorsMatch the result's actual generic type
Status.Successful, etc. (ModularPipelines.Enums.Status)ModuleStatus.Succeeded, etc.See the status table; Retried is removed
summary.GetModuleResultsAsync()summary.ResultsRemove the await for this access only. No live module handles
summary.GetModule<T>()summary.GetResult<TModule, TResult>() / TryGetResult<TModule, TResult>(out var result)Returns a completed result; inspect its outcome before reading .Value
summary.GetFailedModuleResults()summary.Failures and summary.IgnoredFailuresV3 returned both kinds together
summary.Statussummary.SucceededBoolean overall outcome; inspect Failures for details
summary.Start / End / TotalDurationStartTime / EndTime / DurationPipelineSummary is now sealed

Hooks, conditions, and requirements​

Details: Hooks and plugins and Conditions and requirements.

V3 APIV4 APICheck
IPipelineGlobalHooks / IPipelineModuleHooksIPipelineEventHandler / IModuleEventHandlerUpdate callback signatures
IPipelineHookContextIPipelineContextRequirements, run conditions, and pipeline event handlers
IEventHandlerPriority.PriorityIEventHandler.OrderAscending order; add the trailing CancellationToken to handler methods
[RunIfAll<...>][RunIf<...>]Same AND semantics
MandatoryRunConditionAttribute / RunConditionAttribute.ConditionRunConditionAttribute(ConditionIntent.Run) / EvaluateAsyncUse GroupKey for OR-ed alternatives
SkipDecision.Of(condition, reason)SkipDecision.When(condition, reason)
MustAsync / MustEvaluateAsync(context, cancellationToken)Return explicit requirement decisions

Context​

Details: Context services.

V3 APIV4 APICheck
context.Services.Get<T>()context.Services.GetRequiredService<T>()
context.TryGetService<T>()context.Services.GetRequiredService<T>()Use GetService<T>() with null handling only where absence is allowed
BuildSystem.IsGitHubActions, etc.BuildSystem.Is(BuildSystem.GitHubActions), etc.Repeat for each per-system flag. The enum is in ModularPipelines
context.Environment.BuildSystem.IsBuildServercontext.Environment.BuildSystem.IsCIAlso honors a truthy CI variable; IsLocal is the inverse
context.IsRunningInCI()context.Environment.BuildSystem.IsCIAlso honors a truthy CI variable
context.IsRunningLocally()context.Environment.BuildSystem.IsLocalInverse of IsCI
context.IsRunningIn(buildSystem)context.Environment.BuildSystem.Is(buildSystem)V4 compares all enum values, including Unknown; V3 returned false outside its four supported systems

Tools and commands​

Details: Tools and commands, CLI options, and Logging and HTTP.

V3 APIV4 APICheck
context.DotNet() and other tool accessorscontext.Tools.DotNet, etc.Upgrade integration and generator together
Tool command Build(...), etc.BuildAsync(...), etc.Inspect regenerated signatures
context.Shell.Command.ExecuteCommandLineTool(...)context.Shell.RunAsync(...)Pass individual argument tokens
token:cancellationToken:Only changed framework parameters
LogSettingsLoggingCommandExecutionOptions and HttpOptions
CommandLogVerbosity.MinimalCommandLogVerbosity.InputOnlyV3 documented Minimal as errors and warnings; InputOnly logs command input only. Pick the level you need
HttpLoggingOptions.LogRequest, etc.; None / FullShowRequest, etc.; Silent / DiagnosticBodies are no longer logged by default
[CliCommand("tool", ...)][CliTool("tool")] + [CliSubCommand(...)]Handwritten option types only
[CliArgument(Placement = ...)][CliArgument(Phase = ...)]Handwritten option types only. BeforeOptions and ImmediatelyAfterCommand both become EarlyOperand; the default is Passthrough

Files and utilities​

Details: Files and utilities.

V3 APIV4 APICheck
Framework File / FolderFilePath / FolderPathKeep System.IO symbols intact
await context.Files.ExistsAsync(path, cancellationToken)context.Files.Exists(path)Also covers calls without an explicit token. Remove this call's await and token; relative paths use the pipeline working directory
context.Data.Hex.FromHex(value)context.Data.Hex.FromHex(value, Encoding.UTF8) for textOne-argument return type changes from string to byte[]; review var declarations and legacy input validation
context.Data.Hex.ToHex(bytes) with IEnumerable<byte>context.Data.Hex.ToHex(bytes.ToArray())Keep existing byte[] and string arguments unchanged; ToArray needs System.Linq

Exceptions​

Details: Exceptions and extension points.

V3 APIV4 APICheck
PipelineCancelledExceptionPipelineCanceledExceptionDerives from OperationCanceledException, not PipelineException; V4 spells "canceled" with one L throughout
ModuleReferencingSelfExceptionModuleSelfDependencyException
FailedRequirementsExceptionRequirementNotMetException
HttpResponseExceptionPipelineHttpResponseExceptionDerives from HttpRequestException
CommandException.ExitCode, etc.CommandException.Result.ExitCode, etc.ExecutionTime becomes Result.Duration

Integration packages​

Details: Integration packages.

V3 APIV4 APICheck
Git().Information.BranchName, etc.(await Tools.Git.Information.GetRequiredInfoAsync(ct)).BranchNameUse GetInfoAsync if Git may be unavailable; properties can be null
Git().Commands.Push(...), etc.Tools.Git.Commands.Remotes.PushAsync(...), etc.Commands are grouped: Repository, WorkingTree, Branches, Remotes, History, Maintenance
new AzureResourceIdentifier(subscription, group, name)new AzureResourceIdentifier(subscription, group, resourceType, name)Same for the GetResourceIdentifier factories
Azure provisioner methods such as AuthorizationRoleDefinitionSame names with an Async suffixHandwritten ModularPipelines.Azure provisioners
ModularPipelines.AmazonWebServices.LambdaAmazonLambdaClient *Async methodsAdd an explicit AWSSDK.Lambda reference