Skip to main content
net8.0

Azure WebPubSub resource types for Aspire.

Published
Sep 15, 2026
1mo ago
Total Downloads
40.6K
40,578

Install

dotnet add package Aspire.Hosting.Azure.WebPubSub --version 13.5.4
ProductVersions
.NET
net8.0

README

Azure Web PubSub hosting integration

Use this integration to model, configure, and orchestrate Azure Web PubSub in an Aspire solution.

Getting started

Prerequisites

Add the integration

From your AppHost directory, add the Aspire.Hosting.Azure.WebPubSub integration with the Aspire CLI:

aspire add Aspire.Hosting.Azure.WebPubSub

Usage example

In the AppHost, add a WebPubSub connection and reference it from another resource with either C# or TypeScript:

C#

var wps = builder.AddAzureWebPubSub("wps1");

var web = builder.AddProject<Projects.WebPubSubWeb>("webfrontend")
                       .WithReference(wps);

TypeScript

const wps = await builder.addAzureWebPubSub("wps1");

const web = await builder.addNodeApp("webfrontend", "../web-frontend", "server.js")
                       .withReference(wps);

Connection Properties

When you reference an Azure Web PubSub resource using WithReference, the following connection properties are made available to the consuming project:

Property Name Description
Uri The HTTPS endpoint for the Web PubSub service, typically https://<resource-name>.webpubsub.azure.com/

Aspire exposes each property as an environment variable named [RESOURCE]_[PROPERTY]. For instance, the Uri property of a resource called wps1 becomes WPS1_URI.

Additional documentation

Feedback & contributing

https://github.com/microsoft/aspire

Changes from Previous Version

No structural changes between v13.5.3 and v13.5.4.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

Compatibility metadata lists 1 target framework; confirm the exact target used by your application.The published metadata declares 41 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.