Skip to content

[Blazor] Remove HotReload built-into Blazor WebAssembly #62777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 17, 2025

Do not merge before dotnet/sdk#49800

This PR removes the built-in HotReload functionality from Blazor WebAssembly as requested in the issue.

Changes Made

Removed Files

  • src/Components/WebAssembly/WebAssembly/src/HotReload/WebAssemblyHotReload.cs - The main HotReload implementation class
  • src/Components/WebAssembly/WebAssembly/src/HotReload/ - Empty directory after file removal

Updated Files

  • PublicAPI.Shipped.txt - Removed 3 HotReload-related public API entries:

    • Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload
    • ApplyHotReloadDelta method
    • GetApplyUpdateCapabilities method
  • PublicAPI.Unshipped.txt - Removed 19 HotReload-related entries:

    • WebAssemblyHotReload.Delta struct and all its properties
    • WebAssemblyHotReload.LogEntry struct and all its properties
    • ApplyHotReloadDeltas method
  • Boot.WebAssembly.Common.ts - Removed JavaScript interop methods:

    • applyHotReload (obsolete method)
    • applyHotReloadDeltas
    • getApplyUpdateCapabilities
  • GlobalExports.ts - Removed TypeScript interface definitions for the removed methods

  • WebAssemblyHost.cs - Removed:

    • using Microsoft.AspNetCore.Components.WebAssembly.HotReload;
    • using System.Reflection.Metadata; (now unused)
    • HotReload initialization code block
  • Microsoft.AspNetCore.Components.WebAssembly.props - Removed WebAssemblyHotReloadCapabilities property

Impact

This is a clean removal of the self-contained WebAssembly HotReload functionality without affecting:

  • The general hot reload infrastructure used by other Blazor modes
  • Any existing applications (the functionality was internal/framework-only)
  • Build or runtime behavior for WebAssembly applications

Testing

  • WebAssembly project builds successfully without errors
  • Verified no remaining references to removed functionality in source code
  • Confirmed all targeted files and directories are properly cleaned up

Fixes #62776.
Fixes #62371.
Contributes to #61272


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Contributor

Greetings human! You've submitted a PR that modifies code that is shared with https://github.com/dotnet/runtime . Please make sure you synchronize this code with the changes in that repo!

@Copilot Copilot AI changed the title [WIP] [Blazor] Remove HotReload built-into Blazor WebAssembly [Blazor] Remove HotReload built-into Blazor WebAssembly Jul 17, 2025
@Copilot Copilot AI requested a review from maraf July 17, 2025 16:03
Copilot finished work on behalf of maraf July 17, 2025 16:03
@maraf maraf added the area-blazor Includes: Blazor, Razor Components label Jul 17, 2025
@maraf maraf marked this pull request as ready for review July 17, 2025 17:48
@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 17:48
@maraf maraf requested review from tdykstra and a team as code owners July 17, 2025 17:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the built-in HotReload functionality from Blazor WebAssembly.

  • Deletes the WebAssemblyHotReload implementation and its initialization.
  • Cleans up related MSBuild property and public API entries.
  • Removes JavaScript/TypeScript interop methods for HotReload.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Microsoft.AspNetCore.Components.WebAssembly.props Removed WebAssemblyHotReloadCapabilities MSBuild property
PublicAPI.Unshipped.txt Removed HotReload API entries
PublicAPI.Shipped.txt Removed HotReload API entries
HotReload/WebAssemblyHotReload.cs Deleted the entire HotReload implementation class
Hosting/WebAssemblyHost.cs Removed HotReload initialization block and unused usings
src/Components/Web.JS/src/GlobalExports.ts Removed TypeScript interface definitions for HotReload
src/Components/Web.JS/src/Boot.WebAssembly.Common.ts Removed JavaScript interop methods for HotReload

@maraf maraf added this to the 10.0-preview7 milestone Jul 17, 2025
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 Attention: Shared Code Modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Blazor] Remove HotReload built-into Blazor WebAssembly API proposal for hot reload webassembly APIs
2 participants