Skip to main content
net8.0

Azure WebPubSub resource types for Aspire.

Published
Jun 17, 2026
4mo ago
Total Downloads
40.6K
40,578

Install

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

README

Aspire.Hosting.Azure.WebPubSub library

Provides extension methods and resource definitions for an Aspire AppHost to configure Azure Web PubSub.

Getting started

Prerequisites

Install the package

Install the Aspire Azure Web PubSub Hosting library with NuGet:

dotnet add package Aspire.Hosting.Azure.WebPubSub

Usage example

In the AppHost.cs file of AppHost, add a WebPubSub connection and consume the connection using the following methods:

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

var web = builder.AddProject<Projects.WebPubSubWeb>("webfrontend")
                       .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.4.4 and v13.4.5.

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 38 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.