Skip to content

Emit version 2 for NativeAOT managed data descriptor - #132211

Merged
max-charlamb merged 1 commit into
dotnet:mainfrom
max-charlamb:maxcharlamb/fix-nativeaot-descriptor-version
Aug 12, 2026
Merged

Emit version 2 for NativeAOT managed data descriptor#132211
max-charlamb merged 1 commit into
dotnet:mainfrom
max-charlamb:maxcharlamb/fix-nativeaot-descriptor-version

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Summary

Update the ILC-generated NativeAOT managed type sub-descriptor to emit data descriptor version 2.

.NET 11 data contracts were frozen in #131858, which updated the reader to reject descriptors older than version 2. The separate NativeAOT managed descriptor writer was missed and continued emitting version 0. As a result, the matching DataContractReader packages reject NativeAOT binaries produced from the same build, preventing cDAC initialization.

Testing

Internal cDAC dump and end-to-end tests exposed this issue across Windows and Linux architectures with:

Unsupported data descriptor version '0'. Expected version 2.

This change aligns the NativeAOT sub-descriptor with the frozen descriptor format.

Keep the ILC-generated managed type sub-descriptor compatible with the frozen .NET 11 data descriptor format.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 95c4aedd-f09e-42d7-8c9f-f439297576a6
@azure-pipelines

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

1 similar comment
@azure-pipelines

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

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the NativeAOT (ILC-emitted) managed contract sub-descriptor JSON to advertise data descriptor version 2 so it’s accepted by the .NET 11 cDAC DataContractReader tooling, which rejects versions older than 2.

Changes:

  • Bump the emitted JSON "version" field in ManagedDataDescriptorNode from 0 to 2 to match the frozen .NET 11 contract descriptor format.

@max-charlamb
max-charlamb enabled auto-merge (squash) August 12, 2026 15:03
@max-charlamb
max-charlamb merged commit 6ff5991 into dotnet:mainAug 12, 2026
87 of 109 checks passed
@max-charlamb
max-charlamb deleted the maxcharlamb/fix-nativeaot-descriptor-version branch August 12, 2026 16:01
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-rc1 milestone Aug 13, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@max-charlamb@jkotas