Skip to content

[Blazor] Fix Endpoints linker substitution assembly name - #70242

Merged
maraf merged 1 commit into
dotnet:mainfrom
maraf:maraf-linker-xml-regression
Nov 2, 2026
Merged

maraf merged 1 commit into
dotnet:mainfrom
maraf:maraf-linker-xml-regression

Conversation

@maraf

@maraf maraf commented Nov 2, 2026

Copy link
Copy Markdown
Member

Fix Endpoints linker substitution assembly name

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Correct the assembly targeted by the embedded Endpoints linker substitutions.

Description

The Endpoints assembly's embedded ILLink.Substitutions.xml incorrectly targets Microsoft.AspNetCore.Components.Forms, causing IL2101 during trimmed publishing. Change the assembly name to Microsoft.AspNetCore.Components.Endpoints, preserving the existing hot-reload substitution.

One-off validation used the issue's minimal IHtmlHelper console reproduction with repository-built baseline and fixed Endpoints assemblies. Before the fix, trimmed publishing emitted IL2101 and failed with NETSDK1144 when linker warnings were treated as errors. After the fix, publishing succeeded without IL2101 for osx-arm64 and win-x64 with linker warnings treated as errors; the macOS executable also ran successfully.

Validation was on current main targeting .NET 12, not a .NET 11 servicing branch. Windows was cross-published, not executed. No permanent tests were added, as requested; inline documentation is not applicable. All six repository substitution files were checked against their owning projects' evaluated assembly names, with no other mismatches found.

Fixes: #70236

Note

This PR description was generated with the assistance of GitHub Copilot.

Copilot AI balanced review requested due to automatic review settings November 2, 2026 09:58
@maraf
maraf requested a review from a team as a code owner November 2, 2026 09:58
@github-actions github-actions Bot added the area-blazor Includes: Blazor, Razor Components label Nov 2, 2026
@maraf maraf changed the title Fix Endpoints linker substitution assembly name [Blazor] Fix Endpoints linker substitution assembly name Nov 2, 2026
@maraf maraf self-assigned this Nov 2, 2026
@maraf maraf added this to the 12.0-preview1 milestone Nov 2, 2026
@kotlarmilos
kotlarmilos requested review from kotlarmilos and removed request for Copilot November 2, 2026 10:02
@maraf

maraf commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

/azp run aspnetcore-components-e2e

Note

This comment was generated with the assistance of GitHub Copilot.

@azure-pipelines

Copy link
Copy Markdown
No pipelines are associated with this pull request.

@maraf
maraf merged commit f7d14ca into dotnet:main Nov 2, 2026
33 checks passed
@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:11 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:11 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:12 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:14 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:16 — with GitHub Actions Inactive
@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:17 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

✅ No documentation PR was created.

Confidence that documentation is needed: 5%

No docs needed: internal bug fix to a linker substitution file; confident no documentation surface is affected.

Documentation surfaces considered

  • Conceptual article: Not required — Only changes an embedded linker substitution assembly name (ILLink.Substitutions.xml); no public API or documented behavior.
  • Migration guidance: Not required — No user action needed on upgrade.
  • Breaking change: Not required — No compatibility impact; fix removes an IL2101 trimming warning.

@maraf
maraf temporarily deployed to copilot-pat-pool November 2, 2026 12:17 — with GitHub Actions Inactive
@maraf

maraf commented Nov 2, 2026

Copy link
Copy Markdown
Member Author

/backport to release/11.0

Note

This comment was generated with the assistance of GitHub Copilot.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 5f32edb1 Deployed Nov 2, 2026 by maraf via conclusion #149
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.NET 11 regression: malformed linker XML in Components.Endpoints causes IL2101 during trimmed publishing

2 participants