BlazorWasmAppResource
Class sealed net8.0
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.
namespace Aspire.Hosting;
public sealed class BlazorWasmAppResource : Aspire.Hosting.ApplicationModel.Resource, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithEnvironment, Aspire.Hosting.ApplicationModel.IResourceWithParent{ // ...} ResourceIResourceIResourceWithEnvironmentIResourceWithParent
Constructors1
Section titled ConstructorsProperties3
Section titled PropertiesParentgetIResource Gets the parent gateway resource whose lifecycle state is mirrored to this resource. Set internally when
BlazorGatewayExtensions.WithBlazorClientApp associates this WASM app with a gateway. ProjectDirectorygetstringDirectory containing the .csproj file.
ProjectPathgetstringFully-qualified path to the .csproj file.