Opening the book…
The IL trimmer removes what it cannot prove is used. System.Text.Json with reflection, dynamic Activator calls, and third-party mappers are exactly the code it cannot prove — and they fail at runtime, in prod, with cryptic MissingMethodExceptions.
Keep a smoke checklist of reflection-heavy flows (serialization round-trips, dynamic component rendering) and run it against the published output, not dotnet run. Prefer source generators for JSON.
Microsoft Learn — Trim self-contained deployments — Trimmer behavior and opt-outs