Chudleigh.SignalR.SourceGenerator
0.1.0-alpha.1
dotnet add package Chudleigh.SignalR.SourceGenerator --version 0.1.0-alpha.1
NuGet\Install-Package Chudleigh.SignalR.SourceGenerator -Version 0.1.0-alpha.1
<PackageReference Include="Chudleigh.SignalR.SourceGenerator" Version="0.1.0-alpha.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Chudleigh.SignalR.SourceGenerator" Version="0.1.0-alpha.1" />
<PackageReference Include="Chudleigh.SignalR.SourceGenerator"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Chudleigh.SignalR.SourceGenerator --version 0.1.0-alpha.1
#r "nuget: Chudleigh.SignalR.SourceGenerator, 0.1.0-alpha.1"
#:package Chudleigh.SignalR.SourceGenerator@0.1.0-alpha.1
#addin nuget:?package=Chudleigh.SignalR.SourceGenerator&version=0.1.0-alpha.1&prerelease
#tool nuget:?package=Chudleigh.SignalR.SourceGenerator&version=0.1.0-alpha.1&prerelease
Chudleigh.SignalR.SourceGenerator
Roslyn incremental source generators for SignalR HubConnection client and server proxies.
Derived from the experimental SignalR source generators in dotnet/aspnetcore, updated to target modern .NET and to work in AOT-compatible scenarios.
What it generates
[HubClientProxy]— generatesOn<T>registration glue soHubConnection.Oncalls can be strongly typed against a client-callback interface.[HubServerProxy]— generates strongly-typed extension methods that forward toHubConnection.InvokeAsync/SendAsync/StreamAsyncbased on a hub interface.
Both generators eliminate the reflection paths in HubConnection that are incompatible with trimming and AOT.
Usage
Install the package in the project that defines the partial extension-method stub:
<PackageReference Include="Chudleigh.SignalR.SourceGenerator"
Version="0.1.0"
PrivateAssets="all" />
Define the attributes in your project (the generator matches by attribute name, not by assembly):
[AttributeUsage(AttributeTargets.Method)]
internal sealed class HubClientProxyAttribute : Attribute;
[AttributeUsage(AttributeTargets.Method)]
internal sealed class HubServerProxyAttribute : Attribute;
Then declare the partial extension stubs the generator fills in — see the upstream ASP.NET Core samples for the exact shapes.
License
MIT — see LICENSE. Portions derive from ASP.NET Core and retain the .NET Foundation MIT notice; see THIRD-PARTY-NOTICES.txt.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.1 | 83 | 4/18/2026 |