# WithBlazorClientApp

- Module: [Aspire.Hosting.Blazor](/reference/api/go/aspire.hosting.blazor.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`
- Defined on: [`DotnetProjectResource`](/reference/api/go/aspire.hosting.blazor/dotnetprojectresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Attaches a Blazor WebAssembly app to the gateway. The app's resource name becomes its URL path prefix, and its service references are forwarded to the gateway for proxying.

## Remarks

For development and publish prerequisites, see `AddBlazorGateway`.

## Definition

```go
func (DotnetProjectResource) WithBlazorClientApp(
    wasmApp BlazorWasmAppResource,
    options ...*WithBlazorClientAppOptions,
) DotnetProjectResource
```

## Parameters

- `wasmApp` ([`BlazorWasmAppResource`](/reference/api/go/aspire.hosting.blazor/blazorwasmappresource.md)) -- The Blazor WebAssembly app to attach to the gateway.
- `options` (`...*WithBlazorClientAppOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithBlazorClientAppOptions` argument.

- `ApiPrefix` (`*string`) -- The URL path prefix for API proxy routes. The default is `"_api"`.
- `OtlpPrefix` (`*string`) -- The URL path prefix for telemetry proxy routes. The default is `"_otlp"`.
- `ProxyTelemetry` (`*bool`) -- `true` to expose the telemetry proxy for the client app; otherwise, `false`.

## Returns

[`DotnetProjectResource`](/reference/api/go/aspire.hosting.blazor/dotnetprojectresource.md) -- The gateway resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`DotnetProjectResource`](/reference/api/go/aspire.hosting.blazor/dotnetprojectresource.md)
