{"record":{"id":"4d5ab21b463ac8ca","repo":"microsoft/aspire","slug":"step-request-step-not-found-in-pipeline-available-steps","errorCode":null,"errorMessage":"Step '{request.Step}' not found in pipeline. Available steps: {availableSteps}","messagePattern":"Step '(.+?)' not found in pipeline\\. Available steps: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs","lineNumber":318,"sourceCode":"        var model = serviceProvider.GetRequiredService<DistributedApplicationModel>();\n        var executionContext = serviceProvider.GetRequiredService<DistributedApplicationExecutionContext>();\n\n        var pipelineContext = new PipelineContext(model, executionContext, serviceProvider, logger, cancellationToken);\n\n        var resolvedSteps = await pipeline.ResolveStepsAsync(pipelineContext).ConfigureAwait(false);\n\n        // If a target step is specified, filter to its transitive dependencies\n        if (!string.IsNullOrEmpty(request?.Step))\n        {\n            var stepsByName = resolvedSteps.ToDictionary(s => s.Name, StringComparer.Ordinal);\n            if (stepsByName.TryGetValue(request.Step, out var targetStep))\n            {\n                resolvedSteps = DistributedApplicationPipeline.ComputeTransitiveDependencies(targetStep, stepsByName);\n            }\n            else\n            {\n                var availableSteps = string.Join(\", \", resolvedSteps.Select(s => $\"'{s.Name}'\"));\n                throw new InvalidOperationException(\n                    $\"Step '{request.Step}' not found in pipeline. Available steps: {availableSteps}\");\n            }\n        }\n\n        var orderedSteps = DistributedApplicationPipeline.GetTopologicalOrder(resolvedSteps);\n#pragma warning restore ASPIREPIPELINES001\n\n        return new GetPipelineStepsResponse\n        {\n            Steps = orderedSteps.Select(step => new PipelineStepInfo\n            {\n                Name = step.Name,\n                Description = step.Description,\n                DependsOn = [.. step.DependsOnSteps],\n                Tags = [.. step.Tags],\n                ResourceName = step.Resource?.Name\n            }).ToArray()\n        };","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting/Backchannel/AppHostRpcTarget.cs#L300-L336","documentation":"The list-steps RPC request specified a pipeline Step name that does not exist among the resolved pipeline steps, so transitive dependency computation cannot proceed. The message lists all valid step names to help correct the request.","triggerScenarios":"Calling GetPipelineStepsAsync (or the CLI equivalent, e.g. `aspire publish --step X` / list-steps targeting a step) with request.Step set to a name not present in the resolved step set — typos, renamed steps, or steps contributed by annotations that are not registered.","commonSituations":"Typo or stale step name in scripts/automation after the app model changed; targeting a step that only exists in another AppHost; case-sensitivity mismatch (lookup uses Ordinal comparison); step removed in an Aspire version upgrade.","solutions":["Use one of the step names listed in the error's 'Available steps' portion.","Run GetPipelineStepsAsync without request.Step (or `aspire` list-steps) to enumerate valid names.","Check spelling and casing exactly; matching is case-sensitive (StringComparer.Ordinal).","If the step should exist, ensure the code adding the pipeline step annotation/registration runs before resolution."],"exampleFix":"// before\nawait rpc.GetPipelineStepsAsync(new GetPipelineStepsRequest { Step = \"build-containers\" });\n// after\nawait rpc.GetPipelineStepsAsync(new GetPipelineStepsRequest { Step = \"build-container-images\" }); // name from Available steps list","handlingStrategy":"validation","validationCode":"var allSteps = await rpc.GetPipelineStepsAsync(new GetPipelineStepsRequest());\nif (!allSteps.Steps.Any(s => s.Name == targetStep)) throw new ArgumentException($\"Step '{targetStep}' not found. Valid: {string.Join(\", \", allSteps.Steps.Select(s => s.Name))}\");","typeGuard":null,"tryCatchPattern":"try { await rpc.GetPipelineStepsAsync(new GetPipelineStepsRequest { Step = stepName }); }\ncatch (InvalidOperationException ex) when (ex.Message.StartsWith(\"Step '\")) { logger.LogError(ex, \"Unknown pipeline step '{Step}'\", stepName); }","preventionTips":["Enumerate steps first with no Step filter before targeting one.","Copy step names exactly — lookup is case-sensitive (Ordinal).","Re-check step names after AppHost model changes or Aspire upgrades."],"tags":["pipeline","not-found","cli"],"backgroundTag":"resource-not-found","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}