# 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/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L68-L69)

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/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L77-L78)

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/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L88-L89)

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/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Pipelines/PipelineStep.cs#L109-L110)

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.
