Repository navigation
Fix global type names in ILAssembler custom attributes - #137786
Merged
jkoritzinsky merged 1 commit intoNov 18, 2026
Merged
jkoritzinsky merged 1 commit into
jkoritzinsky merged 1 commit into
Conversation
Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The global-namespace type-name serialization fix has no active review issues.
No open issues 🎉
What changed in this PR
Fixes managed ILAssembler’s serialization of global-namespace type names in custom attributes, preventing erroneous leading dots that cause debugger proxy type-loading failures.
Changes:
- Adds namespace separators only for nonempty namespaces in type definitions and references.
- Adds regression coverage for global, namespaced, and nested types.
- Extends external-type coverage across assembly public-key formats.
| File | Description |
|---|---|
src/tools/ilasm/tests/ILAssembler.Tests/CustomAttributeTests.cs |
Tests reflection type names and external assembly-qualified names. |
src/tools/ilasm/src/ILAssembler/EntityRegistry.cs |
Omits namespace separators when the namespace is empty. |
Review effort: Balanced
jkotas
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Managed ILAssembler writes a leading dot when serializing global-namespace types in typed custom attributes. This causes Roslyn's C# and VB debugger proxy tests to fail with
TypeLoadExceptionfor.<>Mangled.Only add a namespace separator when the namespace is nonempty for type definitions and references. Add regression coverage for global, namespaced, nested, and external types. The fixed net472 package emits the same proxy type blob as native ilasm.
Validation
./.dotnet/dotnet.exe test src/tools/ilasm/ilasm.slnx --logger 'trx;LogFilePrefix=after'- passed: 11,253 tests, 3 skipped../.dotnet/dotnet.exe test src/tools/ilasm/tests/ILAssembler.Tests --filter 'FullyQualifiedName~CustomAttribute_DebuggerTypeProxy_EmitsReflectionTypeName|FullyQualifiedName~CustomAttribute_VerbalTypeArgumentFromUnversionedAssemblyReference'- passed 10 tests each on net10.0 and net12.0. Six failed before the fix on net10.0.Note
This description was generated with GitHub Copilot.