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

Merged
merged 3 commits into from
Jul 18, 2025
Merged

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.

Co-authored-by: maraf <10020471+maraf@users.noreply.github.com>
@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
@@ -80,7 +80,6 @@ Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration
Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration.this[string! key].set -> void
Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostConfiguration.WebAssemblyHostConfiguration() -> void
Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostEnvironmentExtensions
Microsoft.AspNetCore.Components.WebAssembly.HotReload.WebAssemblyHotReload
Copy link
Member

Choose a reason for hiding this comment

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

Instead of removing APIs from here, mark them as removed in PublicAPI.Unshipped.txt

Documentation says:

Removed APIs

A new entry needs to be added to the PublicAPI.Unshipped.txt file for a removed API. For example:

#nullable enable
*REMOVED*Microsoft.Builder.OldApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 2805982. The HotReload APIs are now marked as REMOVED in PublicAPI.Unshipped.txt instead of being deleted from PublicAPI.Shipped.txt.

…eting

Co-authored-by: maraf <10020471+maraf@users.noreply.github.com>
Copilot finished work on behalf of maraf July 18, 2025 07:51
@Copilot Copilot AI requested a review from maraf July 18, 2025 07:51
@maraf
Copy link
Member

maraf commented Jul 18, 2025

/ba-g KestrelMetricsTests.Http1Connection_ServerShutdown_Abort and template test failures are unrelated

@maraf maraf merged commit ed1b91f into main Jul 18, 2025
26 of 30 checks passed
@maraf maraf deleted the copilot/fix-62776 branch July 18, 2025 13:16
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
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy