Skip to content

Remove UseOptimizedPublish=false from trimming tests after updating to the .NET 11 GA SDK #136283

Open

Description

@akoeplinger

Cleanup

Remove <UseOptimizedPublish>false</UseOptimizedPublish> from eng/testing/linker/SupportFiles/Directory.Build.props once dotnet/runtime updates to the .NET 11.0 GA SDK.

Background

The workaround is being added in #136229 after the SDK update from RC1 to 11.0.100-rc.2.26504.105. Both Linux and Windows NativeAOT test-app jobs fail in Microsoft.Extensions.Options.TrimmingTests/ConfigureTests with CS0111 for the generated LocalOptionsValidator.Validate method and CS0433 for generated validation attributes.

The RC2 SDK enables optimized NativeAOT publishing by default (dotnet/sdk#54515). The opt-out restores the full Build target sequence without disabling NativeAOT or trimming. The failing binlog confirms that optimized publishing was enabled; the workaround has not yet been confirmed by a CI rerun.

CI evidence: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1644729

Completion criteria

  • Update to the .NET 11.0 GA SDK.
  • Remove the opt-out and rerun the trimming/NativeAOT test-app jobs on Linux and Windows, including ConfigureTests.
  • Confirm the jobs pass with optimized publishing enabled. If the failure persists, investigate the SDK integration rather than assuming GA fixes it.

Note

This issue was generated by GitHub Copilot.

Activity

  1. dotnet-policy-service commented on Oct 22, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
    See info in area-owners.md if you want to be subscribed.

  2. MichalPetryka commented on Oct 22, 2026

    @MichalPetryka
    Contributor
    • Confirm the jobs pass with optimized publishing enabled. If the failure persists, investigate the SDK integration rather than assuming GA fixes it

    IIRC GA is making it disabled by default again due to compat issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions