Skip to content

[release/10.0] Force MetaDataGetDispenser to be linked into singlefilehost#127237

Merged
steveisok merged 4 commits intorelease/10.0from
backport/pr-127036-to-release/10.0
Apr 24, 2026
Merged

[release/10.0] Force MetaDataGetDispenser to be linked into singlefilehost#127237
steveisok merged 4 commits intorelease/10.0from
backport/pr-127036-to-release/10.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 21, 2026

Backport of #127036 to release/10.0

/cc @elinor-fung

Customer Impact

  • Customer reported
  • Found internally

The MetaDataGetDispenser export is used by native profilers to attach to .NET processes. In .NET 10, for single-file, this export no longer existed, so profilers are not able to attach to single-file apps.

The fix adds linker flags to retain needed exports when building singlefilehost.

Fixes #126634

Regression

  • Yes
  • No

Side effect of refactoring in c8403e6

Testing

Manually verified. Automated test added.

Risk

Low.

elinor-fung and others added 3 commits April 21, 2026 18:39
Add linker flags on Unix/macOS to force MetaDataGetDispenser as
an undefined symbol, which makes the linker pull mscoree.o from
coreclr_static. On Windows, the .def file already forces this.

Add a test that validates the export is present in the singlefilehost
binary using NativeLibrary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@elinor-fung elinor-fung force-pushed the backport/pr-127036-to-release/10.0 branch from c2614a9 to 07ac1da Compare April 22, 2026 22:21
@elinor-fung elinor-fung added the Servicing-consider Issue for next servicing release review label Apr 23, 2026
@elinor-fung elinor-fung added this to the 10.0.x milestone Apr 23, 2026
@steveisok steveisok added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Apr 24, 2026
@steveisok steveisok enabled auto-merge (squash) April 24, 2026 16:26
@steveisok steveisok merged commit 6cef421 into release/10.0 Apr 24, 2026
169 of 172 checks passed
@steveisok steveisok deleted the backport/pr-127036-to-release/10.0 branch April 24, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Host Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants