Summary
SignalR Client supports Native AOT (confirmed by dotnet/aspnetcore#59133). The requirement is using JSON protocol + registering JsonSerializerContext — which UpgradeHubService already does. Therefore all AOT conditional exclusions for SignalR/Hubs/SilentPoll are unnecessary and should be removed.
Also removes deprecated abstract methods in AbstractBootstrap that are never invoked.
Changes
csproj
- Remove
#define AOT constant
- Remove
Condition="'$(PublishAot)' != 'true'" from 3 SignalR.Client PackageReference entries
- Remove 3
<Compile Remove> entries for AOT exclusion (Hubs/*.cs, HubDownloadSource.cs, SilentPollOrchestrator.cs)
GeneralUpdateBootstrap.cs
- Remove
#if !AOT / #endif around HubDownloadSource initialization
- Remove
#if !AOT / #else / #endif around LaunchSilentAsync method body
- Delete 3 deprecated override methods (StrategyFactory, ExecuteStrategyAsync, ExecuteStrategy) that throw NotImplementedException
AbstractBootstrap.cs
- Delete 3 deprecated abstract methods (ExecuteStrategy, ExecuteStrategyAsync, StrategyFactory) — only LaunchAsync remains as the sole abstract method
Summary
SignalR Client supports Native AOT (confirmed by dotnet/aspnetcore#59133). The requirement is using JSON protocol + registering JsonSerializerContext — which UpgradeHubService already does. Therefore all AOT conditional exclusions for SignalR/Hubs/SilentPoll are unnecessary and should be removed.
Also removes deprecated abstract methods in AbstractBootstrap that are never invoked.
Changes
csproj
#define AOTconstantCondition="'$(PublishAot)' != 'true'"from 3 SignalR.Client PackageReference entries<Compile Remove>entries for AOT exclusion (Hubs/*.cs, HubDownloadSource.cs, SilentPollOrchestrator.cs)GeneralUpdateBootstrap.cs
#if !AOT/#endifaround HubDownloadSource initialization#if !AOT/#else/#endifaround LaunchSilentAsync method bodyAbstractBootstrap.cs