Skip to content

Conversation

javiercn
Copy link
Member

@javiercn javiercn commented Sep 21, 2025

[Blazor] Remove unnecessary update to the Blazor webassembly js file

Remove redundant blazor.webassembly.js update that broke publish

Description

Hosted webassembly apps failed to publish due to a bug in how we were trying to update the blazor.webassembly.js asset definition. We realized that we did not have to do so, but that there was a bug precluding us from finding the asset during the publish process.

The fix corrects the identity of the blazor.webassembly.js to account for the fingerprint for the file we introduced in 10.0, which wasn't being taken into account.

Fixes #119886

Customer Impact

Customers with a hosted Blazor WebAssembly + Web API (Server) solution failed to publish. There is no straightforward user workaround short of editing writing a significant amount of MSBuild to work around the issue.

Regression?

  • Yes
  • No

Regressed from .NET 8 (publishing the same project type succeeded in 8.x).

Risk

  • High
  • Medium
  • Low

Justification: The change only removes an unnecessary build step and fixes a case that was exclusively related to Blazor webassembly. It does not alter the contents of the delivered script, pipeline ordering, or introduce new logic— it simply stops creating an anomalous asset entry. Existing publish & static web asset tests still apply. Low surface area and isolated to Blazor WASM publish scenario.

Verification

  • Manual (required)
    • Reproduced failure with unpatched SDK (publish fails).
    • Applied change; publish succeeds
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@javiercn javiercn requested a review from maraf September 21, 2025 10:06
@javiercn javiercn force-pushed the javiercn/fix-blazor-hard-fingerprinting-magic-behavior branch 2 times, most recently from ea052a7 to faec67a Compare September 21, 2025 10:49
@javiercn javiercn marked this pull request as ready for review September 22, 2025 04:46
@javiercn javiercn requested a review from a team as a code owner September 22, 2025 04:46
Copy link
Member

@maraf maraf left a comment

Choose a reason for hiding this comment

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

StaticWebAsset identity for fingerprinted blazor.js is correct

StaticWebAsset identity for fingerprinted blazor.js is correct

@javiercn javiercn force-pushed the javiercn/fix-blazor-hard-fingerprinting-magic-behavior branch from 5146603 to 52ca4a7 Compare September 22, 2025 11:59
@javiercn javiercn force-pushed the javiercn/fix-blazor-hard-fingerprinting-magic-behavior branch 2 times, most recently from 93b1cc7 to 9c74276 Compare September 22, 2025 14:56
@javiercn javiercn force-pushed the javiercn/fix-blazor-hard-fingerprinting-magic-behavior branch from 9c74276 to 0dc4703 Compare September 22, 2025 16:54
@lewing
Copy link
Member

lewing commented Sep 22, 2025

@lewing
Copy link
Member

lewing commented Sep 22, 2025

/backport to release/10.0.1xx-rc2

Copy link
Contributor

Started backporting to release/10.0.1xx-rc2: https://github.com/dotnet/sdk/actions/runs/17931765331

@javiercn javiercn merged commit e6f25ab into release/10.0.1xx Sep 23, 2025
27 checks passed
@javiercn javiercn deleted the javiercn/fix-blazor-hard-fingerprinting-magic-behavior branch September 23, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AspNetCore RazorSDK, BlazorWebAssemblySDK, dotnet-watch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants