# addBlazorGateway

- Module: [Aspire.Hosting.Blazor](/reference/api/typescript/aspire.hosting.blazor.md)
- Version: `13.4.0-preview.1.26281.18`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Registers the built-in Blazor Gateway as a file-based C# app. The gateway is shipped as Gateway.cs alongside this library and launched via `AddCSharpApp`. No separate project is needed.

## Definition

```typescript
interface IDistributedApplicationBuilder {
  // ... omitted for brevity
  addBlazorGateway(name: string): ProjectResource
}
```

## Parameters

- `name` (`string`)

## Returns

`ProjectResource` `builder`

## Applies to

- [IDistributedApplicationBuilder](/reference/api/typescript/aspire.hosting.blazor/idistributedapplicationbuilder.md)
