Skip to content

Eliminate Native AOT warnings from MSBuild-backed CLI commands - #55801

Draft
nagilson with Copilot wants to merge 2 commits into
mainfrom
copilot/eliminate-native-aot-warnings
Draft

Eliminate Native AOT warnings from MSBuild-backed CLI commands#55801
nagilson with Copilot wants to merge 2 commits into
mainfrom
copilot/eliminate-native-aot-warnings

Conversation

Copilot AI commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

MSBuild-backed Native AOT commands pulled unused Newtonsoft.Json APIs into the trim closure, producing IL2026 and IL3050 diagnostics.

  • Constrain the AOT dependency closure

    • Disable Newtonsoft.Json LINQ-to-JSON serialization, component-model, and dynamic features.
    • Mark each switch as trimmable so ILC removes the associated reflection, expression-tree, and dynamic-binder paths.
  • Prevent regressions

    • Extend the existing AOT feature-switch test to verify these APIs remain disabled alongside NuGet’s System.Text.Json path.
<RuntimeHostConfigurationOption
    Include="Newtonsoft.Json.Linq.JToken.DynamicIsSupported"
    Value="false"
    Trim="true" />

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: nagilson <23152278+nagilson@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Native AOT warnings from MSBuild-backed CLI commands Eliminate Native AOT warnings from MSBuild-backed CLI commands Aug 17, 2026
Copilot AI requested a review from nagilson August 17, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Eliminate Native AOT warnings from MSBuild-backed CLI commands

2 participants