# PipelineStep Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [PipelineStep](/reference/api/csharp/aspire.hosting/pipelinestep.md)
- Kind: `Methods`
- Members: `4`

Represents a step in the deployment pipeline.

## DependsOn(string)

- Name: `DependsOn(string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L85-L86)

Adds a dependency on another step.

```csharp
public class PipelineStep
{
    public void DependsOn(
        string stepName)
    {
        // ...
    }
}
```

## Parameters

- `stepName` (`string`)
  The name of the step to depend on.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.

## DependsOn(PipelineStep)

- Name: `DependsOn(PipelineStep)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L94-L95)

Adds a dependency on another step.

```csharp
public class PipelineStep
{
    public void DependsOn(
        PipelineStep step)
    {
        // ...
    }
}
```

## Parameters

- `step` ([PipelineStep](/reference/api/csharp/aspire.hosting/pipelinestep.md))
  The step to depend on.

## RequiredBy(string)

- Name: `RequiredBy(string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L105-L106)

Specifies that this step is required by another step. This creates the inverse relationship where the other step will depend on this step.

```csharp
public class PipelineStep
{
    public void RequiredBy(
        string stepName)
    {
        // ...
    }
}
```

## Parameters

- `stepName` (`string`)
  The name of the step that requires this step.

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.

## RequiredBy(PipelineStep)

- Name: `RequiredBy(PipelineStep)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L126-L127)

Specifies that this step is required by another step. This creates the inverse relationship where the other step will depend on this step.

```csharp
public class PipelineStep
{
    public void RequiredBy(
        PipelineStep step)
    {
        // ...
    }
}
```

## Parameters

- `step` ([PipelineStep](/reference/api/csharp/aspire.hosting/pipelinestep.md))
  The step that requires this step.
