# withBlazorClientApp

- 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)

Attaches a Blazor WebAssembly app to the Gateway. The resource name is used as the URL path prefix (e.g., resource "store" → /store/). Service names are derived from WithReference() annotations on the WASM resource. Service references from the WASM app are automatically forwarded to the gateway so the gateway can resolve service endpoints for YARP proxying.

## Definition

```typescript
interface ProjectResource {
  // ... omitted for brevity
  withBlazorClientApp(
    wasmApp: BlazorWasmAppResource,
    apiPrefix?: string,
    otlpPrefix?: string,
    proxyTelemetry?: boolean): ProjectResource
}
```

## Parameters

- `wasmApp` ([BlazorWasmAppResource](/reference/api/typescript/aspire.hosting.blazor/blazorwasmappresource.md))
- `apiPrefix` (`string`) `optional` `= _api`
- `otlpPrefix` (`string`) `optional` `= _otlp`
- `proxyTelemetry` (`boolean`) `optional` `= True`

## Returns

`ProjectResource` `builder`

## Applies to

- [ProjectResource](/reference/api/typescript/aspire.hosting.blazor/projectresource.md)
- [CSharpAppResource](/reference/api/typescript/aspire.hosting.blazor/csharpappresource.md)
