# AzureContainerAppProjectExtensions Methods

- Package: [Aspire.Hosting.Azure.AppContainers](/reference/api/csharp/aspire.hosting.azure.appcontainers.md)
- Type: [AzureContainerAppProjectExtensions](/reference/api/csharp/aspire.hosting.azure.appcontainers/azurecontainerappprojectextensions.md)
- Kind: `Methods`
- Members: `1`

Provides extension methods for publishing project resources as container apps in Azure.

## PublishAsAzureContainerApp(IResourceBuilder<T>, Action<AzureResourceInfrastructure, ContainerApp>)

- Name: `PublishAsAzureContainerApp(IResourceBuilder<T>, Action<AzureResourceInfrastructure, ContainerApp>)`
- Modifiers: `extension`
- Returns: `IResourceBuilder<T>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.AppContainers/AzureContainerAppProjectExtensions.cs#L39-L51)

Allows configuring the specified project resource as a container app.

```csharp
public static class AzureContainerAppProjectExtensions
{
    public static IResourceBuilder<T> PublishAsAzureContainerApp<T>(
        this IResourceBuilder<T> project,
        Action<AzureResourceInfrastructure, ContainerApp> configure)
    {
        // ...
    }
}
```

## Parameters

- `project` (`IResourceBuilder<T>`)
  The project resource builder.
- `configure` (`Action<AzureResourceInfrastructure, ContainerApp>`)
  The configuration action for the container app.

## Returns

`IResourceBuilder<T>` -- The updated project resource builder.

## Remarks

This method adds the necessary infrastructure for container apps to the application builder and applies the specified configuration to the container app.

```csharp
builder.AddProject<Projects.Api>.PublishAsAzureContainerApp((infrastructure, app) =>
{
    // Configure the container app here
});
```

## ATS metadata

### ATS export

- Available to Polyglot AppHosts through the Aspire Type System.
