aspnet-core
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging,…
Integrate ManagedCode.Orleans.SignalR for grain-driven SignalR delivery, connection and group routing, offline user queues, and restart-safe state. USE FOR: Orleans backplane setup, grain-to-hub publishing, reconnect, heartbeat, and client-invocation failures. DO NOT USE FOR:
Claude Code
$ npx -y skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr --agent claude-code
Codex
$ npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -a codex -y
Cursor
$ npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -a cursor -y
Gemini CLI
$ npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -a gemini-cli -y
GitHub Copilot
$ npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -a github-copilot -y
OpenCode
$ npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -a opencode -y
Windsurf
$ npx skills add managedcode/dotnet-skills --skill managedcode-orleans-signalr -a windsurf -y
name: managedcode-orleans-signalr description: "Integrate ManagedCode.Orleans.SignalR for grain-driven SignalR delivery, connection and group routing, offline user queues, and restart-safe state. USE FOR: Orleans backplane setup, grain-to-hub publishing, reconnect, heartbeat, and client-invocation failures. DO NOT USE FOR: ordinary SignalR without Orleans or unrelated persistence. INVOKES: inspect configuration, implement the integration, and validate connected-client delivery." compatibility: "Requires a .NET application with compatible Orleans and ASP.NET Core SignalR packages; use aligned ManagedCode.Orleans.SignalR Client and Server versions."
For a host that runs both the silo and SignalR endpoint:
dotnet add package ManagedCode.Orleans.SignalR.Server --version 10.3.0 dotnet add package ManagedCode.Orleans.SignalR.Client --version 10.3.0
For separate hosts, put Server on the silo and Client on the ASP.NET Core endpoint. Core supplies shared contracts transitively. Keep versions and partition options aligned across participants; preserve central package management when present.
A combined local development host can use the memory provider:
using ManagedCode.Orleans.SignalR.Server.Extensions;
using Microsoft.AspNetCore.SignalR;
var builder = WebApplication.CreateBuilder(args);
builder.Host.UseOrleans(silo =>
{
silo.UseLocalhostClustering();
silo.ConfigureOrleansSignalR();
silo.AddOrleansSignalRInMemoryStorage();
});
builder.Services.AddSignalR().AddOrleans(options =>
{
options.ConnectionPartitionCount = 4;
options.GroupPartitionCount = 4;
options.KeepMessageInterval = TimeSpan.FromMinutes(5);
options.MaxQueuedMessagesPerUser = 100;
});
var app = builder.Build();
app.MapHub<UpdatesHub>("/updates");
app.Run();
public sealed class UpdatesHub : Hub { }Import only `Server.Extensions` for this combined host; a separate client-only endpoint uses `Client.Extensions`. Importing both makes `AddOrleans` ambiguous. Use authenticated hub endpoints and the application's existing cluster discovery in deployed environments. The memory provider does not survive silo restarts. When offline delivery must survive restarts, register a durable Orleans grain-storage provider under `OrleansSignalROptions.OrleansSignalRStorage` instead of the memory helper. Connection metadata, queued messages, heartbeat registrations, and invocation state use this named store.
Inject `IHubContext<UpdatesHub>` into the grain or application service that owns the event:
using Microsoft.AspNetCore.SignalR;
public sealed class UpdatePublisher(IHubContext<UpdatesHub> hub)
{
public Task NotifyUserAsync(string userId, string eventId, string text) =>
hub.Clients.User(userId).SendAsync("Updated", eventId, text);
public Task NotifyGroupAsync(string group, string eventId, string text) =>
hub.Clients.Group(group).SendAsync("Updated", eventId, text);
}Register a receiver before starting the connection. This example uses the application's `@microsoft/signalr` client:
import { HubConnectionBuilder } from '@microsoft/signalr';
const connection = new HubConnectionBuilder()
.withUrl('/updates')
.withAutomaticReconnect()
.build();
connection.on('Updated', (eventId, text) => {
renderUpdate(eventId, text); // Application-owned rendering and deduplication.
});
await connection.start();Derive `userId` and permitted group membership from authenticated application identity. Never treat a client-supplied user or group name as authorization. Keep domain state in the owning grain; the backplane transports notifications about that state.
flowchart LR G[Grain or service] --> H[IHubContext] H --> R[Orleans connection, group, or user routing] R --> L[Live observer dispatch] R --> Q[Offline user queue in named grain storage] Q --> P[Reconnect and replay] P --> A[Acknowledge delivery ID] A --> D[Remove queued message] L --> C[SignalR client] P --> C
1. Choose combined or separate silo/endpoint hosts and align packages, clustering, partition o
Stop explaining .NET to your AI. Start building. We've all been there: asking Claude to use Entity Framework, only to get EF6 patterns in a .NET 8 project. Explaining to Copilot that Blazor Server and Blazor WebAssembly aren't the same thing.
Build, debug, modernize, or review ASP.NET Core applications with correct hosting, middleware, security, configuration, logging,…
Build, upgrade, and operate Aspire 13.5.x C# or TypeScript application hosts with the current CLI, AppHost, ServiceDefaults,…
Build and debug Avalonia 11/12 .NET applications with XAML, compiled bindings, MVVM, custom controls, desktop lifetimes, and…
Build, review, or migrate Azure Functions in .NET with correct execution model, isolated worker setup, bindings, DI, and Durable…
Build and review Blazor applications across server, WebAssembly, web app, and hybrid scenarios with correct component design,…
Maintain or migrate EF6-based applications with realistic guidance on what to keep, what to modernize, and when EF Core is or is…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.