# PublishingExtensions

- Kind: `class`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.Pipelines`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/Publishing/PublishingExtensions.cs)

Extension methods for [IReportingStep](/reference/api/csharp/aspire.hosting/ireportingstep.md) and [IReportingTask](/reference/api/csharp/aspire.hosting/ireportingtask.md) to provide direct operations.

## Definition

```csharp
namespace Aspire.Hosting.Pipelines;

public static class PublishingExtensions
{
    // ...
}
```

## ATS metadata

### Ignored by ATS

- Reason: Convenience wrapper over pipeline APIs -- use the dedicated ATS pipeline exports instead.

## Methods

- [FailAsync(IReportingStep, string?, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#failasync-ireportingstep-string-cancellationtoken) : [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) `extension` -- Completes a publishing step with an error.
- [FailAsync(IReportingStep, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#failasync-ireportingstep-markdownstring-cancellationtoken) : [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) `extension` -- Completes a publishing step with an error and Markdown-formatted message.
- [FailAsync(IReportingTask, string?, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#failasync-ireportingtask-string-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Completes a publishing task with an error.
- [FailAsync(IReportingTask, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#failasync-ireportingtask-markdownstring-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Completes a publishing task with an error and Markdown-formatted message.
- [SucceedAsync(IReportingStep, string?, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#succeedasync-ireportingstep-string-cancellationtoken) : [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) `extension` -- Completes a publishing step successfully.
- [SucceedAsync(IReportingStep, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#succeedasync-ireportingstep-markdownstring-cancellationtoken) : [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) `extension` -- Completes a publishing step successfully with a Markdown-formatted message.
- [SucceedAsync(IReportingTask, string?, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#succeedasync-ireportingtask-string-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Completes a publishing task successfully.
- [SucceedAsync(IReportingTask, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#succeedasync-ireportingtask-markdownstring-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Completes a publishing task successfully with a Markdown-formatted message.
- [UpdateStatusAsync(IReportingTask, string, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#updatestatusasync-ireportingtask-string-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Updates the status text of a publishing task.
- [UpdateStatusAsync(IReportingTask, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#updatestatusasync-ireportingtask-markdownstring-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Updates the status text of a publishing task with Markdown-formatted text.
- [WarnAsync(IReportingStep, string?, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#warnasync-ireportingstep-string-cancellationtoken) : [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) `extension` -- Completes a publishing step with a warning.
- [WarnAsync(IReportingStep, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#warnasync-ireportingstep-markdownstring-cancellationtoken) : [Task<IReportingStep>](/reference/api/csharp/aspire.hosting/ireportingstep.md) `extension` -- Completes a publishing step with a warning and Markdown-formatted message.
- [WarnAsync(IReportingTask, string?, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#warnasync-ireportingtask-string-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Completes a publishing task with a warning.
- [WarnAsync(IReportingTask, MarkdownString, CancellationToken)](/reference/api/csharp/aspire.hosting/publishingextensions/methods.md#warnasync-ireportingtask-markdownstring-cancellationtoken) : [Task<IReportingTask>](/reference/api/csharp/aspire.hosting/ireportingtask.md) `extension` -- Completes a publishing task with a warning and Markdown-formatted message.
