SpikerSoft.Api/SpikerSoft.API.csproj sets <IsAotCompatible>true</IsAotCompatible>, a leftover from a .NET 10-preview AOT experiment (PublishAot, PublishTrimmed, TrimMode are all commented out right below it). That single flag turns on the trim/AOT analyzers, which emit 115 warnings in Api alone (66 IL2026 RequiresUnreferencedCode + 49 IL3050 RequiresDynamicCode).
These warnings are noise for this host: Api is published framework-dependent (Dockerfile: dotnet publish /p:UseAppHost=false, no PublishAot/PublishTrimmed) and runs as a normal JIT service on the Swarm. Its MVC + MediatR + EF Core Mongo + reflection-based System.Text.Json/Mongo serialization stack is fundamentally not trim/AOT-safe, so the analyzer is flagging real trim-unsafety against a publish mode Api never uses.
Fix
Remove <IsAotCompatible>true</IsAotCompatible> from the Api csproj (analyzer-only flag; produces identical IL and an identical published artifact). A comment documents why the host is intentionally not AOT/trim-targeted, so the flag is not reinnstated. This clears all 115 IL2026/IL3050 findings at the source rather than dispositioning them one by one, and stops future IL-warning accumulation.
GameServer (genuinely PublishAot=true) is untouched — its trim/AOT analyzers stay on and its warnings, if any, remain real.
No runtime/behavior change: analyzer-only MSBuild property, framework-dependent publish unchanged.
## Problem
`SpikerSoft.Api/SpikerSoft.API.csproj` sets `<IsAotCompatible>true</IsAotCompatible>`, a leftover from a .NET 10-preview AOT experiment (`PublishAot`, `PublishTrimmed`, `TrimMode` are all commented out right below it). That single flag turns on the trim/AOT analyzers, which emit **115 warnings** in Api alone (66 IL2026 `RequiresUnreferencedCode` + 49 IL3050 `RequiresDynamicCode`).
These warnings are noise for this host: Api is published **framework-dependent** (`Dockerfile`: `dotnet publish /p:UseAppHost=false`, no `PublishAot`/`PublishTrimmed`) and runs as a normal JIT service on the Swarm. Its MVC + MediatR + EF Core Mongo + reflection-based `System.Text.Json`/Mongo serialization stack is fundamentally not trim/AOT-safe, so the analyzer is flagging real trim-unsafety against a publish mode Api never uses.
## Fix
Remove `<IsAotCompatible>true</IsAotCompatible>` from the Api csproj (analyzer-only flag; produces identical IL and an identical published artifact). A comment documents why the host is intentionally not AOT/trim-targeted, so the flag is not reinnstated. This clears all 115 IL2026/IL3050 findings at the source rather than dispositioning them one by one, and stops future IL-warning accumulation.
GameServer (genuinely `PublishAot=true`) is untouched — its trim/AOT analyzers stay on and its warnings, if any, remain real.
## Verification
- `dotnet build SpikerSoft.API.csproj -c Release`: **Build succeeded, 0 IL2026/IL3050 warnings** (was 115).
- `dotnet build SpikerSoft.UnitTests.slnf -c Release`: **Build succeeded, 0 errors**.
- No runtime/behavior change: analyzer-only MSBuild property, framework-dependent publish unchanged.
Resolved in spikersoft-backend PR #381 (merged to master). Removed the stale <IsAotCompatible>true> from SpikerSoft.API.csproj (leftover from the abandoned .NET 10-preview AOT trial), which cleared all 115 IL2026/IL3050 warnings at the source with zero runtime change. CI: both amd64+arm64 image builds and unit tests passed green. Closing.
Resolved in spikersoft-backend PR #381 (merged to `master`). Removed the stale `<IsAotCompatible>true>` from `SpikerSoft.API.csproj` (leftover from the abandoned .NET 10-preview AOT trial), which cleared all 115 IL2026/IL3050 warnings at the source with zero runtime change. CI: both amd64+arm64 image builds and unit tests passed green. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
SpikerSoft.Api/SpikerSoft.API.csprojsets<IsAotCompatible>true</IsAotCompatible>, a leftover from a .NET 10-preview AOT experiment (PublishAot,PublishTrimmed,TrimModeare all commented out right below it). That single flag turns on the trim/AOT analyzers, which emit 115 warnings in Api alone (66 IL2026RequiresUnreferencedCode+ 49 IL3050RequiresDynamicCode).These warnings are noise for this host: Api is published framework-dependent (
Dockerfile:dotnet publish /p:UseAppHost=false, noPublishAot/PublishTrimmed) and runs as a normal JIT service on the Swarm. Its MVC + MediatR + EF Core Mongo + reflection-basedSystem.Text.Json/Mongo serialization stack is fundamentally not trim/AOT-safe, so the analyzer is flagging real trim-unsafety against a publish mode Api never uses.Fix
Remove
<IsAotCompatible>true</IsAotCompatible>from the Api csproj (analyzer-only flag; produces identical IL and an identical published artifact). A comment documents why the host is intentionally not AOT/trim-targeted, so the flag is not reinnstated. This clears all 115 IL2026/IL3050 findings at the source rather than dispositioning them one by one, and stops future IL-warning accumulation.GameServer (genuinely
PublishAot=true) is untouched — its trim/AOT analyzers stay on and its warnings, if any, remain real.Verification
dotnet build SpikerSoft.API.csproj -c Release: Build succeeded, 0 IL2026/IL3050 warnings (was 115).dotnet build SpikerSoft.UnitTests.slnf -c Release: Build succeeded, 0 errors.Resolved in spikersoft-backend PR #381 (merged to
master). Removed the stale<IsAotCompatible>true>fromSpikerSoft.API.csproj(leftover from the abandoned .NET 10-preview AOT trial), which cleared all 115 IL2026/IL3050 warnings at the source with zero runtime change. CI: both amd64+arm64 image builds and unit tests passed green. Closing.