Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

BlazorWasmAppResource

Handle
📦 Aspire.Hosting.Blazor v17.0.0-preview.1.26565.2

A resource representing a Blazor WebAssembly application project. This is not a running process — it's metadata about a WASM project whose static web assets are served through a Gateway. Implements IResourceWithEnvironment so that WithReference() can be used to declare service dependencies (the annotations are read at orchestration time). Implements IResourceWithParent so that the orchestrator mirrors the gateway's lifecycle state (Running, Stopped, etc.) to this child resource automatically.

type BlazorWasmAppResource interface {
Resource
ResourceWithEnvironment
ResourceWithParent
}

Methods

Configures the browser launched when starting a debug session for the Blazor WebAssembly app. The value is read when the debugger is registered on the gateway, so call this before WithBlazorClientApp or WithBlazorClientApp attaches the app.
WithBlazorDebuggerBrowser(options ...*WithBlazorDebuggerBrowserOptions) BlazorWasmAppResource
options...*WithBlazorDebuggerBrowserOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithBlazorDebuggerBrowserOptions argument.

Browser*stringThe browser to use for debugging. Defaults to "msedge". Supported values include "msedge" and "chrome".
BlazorWasmAppResource

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