Skip to content

[browser] Migrate WebAssemblyHotReloadCapabilities from Blazor to WasmSDK #117747

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 1 commit into from
Jul 17, 2025

Conversation

maraf
Copy link
Member

@maraf maraf commented Jul 17, 2025

In dotnet/sdk#49800 we are introducing a HotReload package that will be automatically referenced by WasmSDK and usable for all WebAssembly in browser scenarios. We need to set HotReload capabilities in a common place.

In .NET 8+ the runtime capabilities are the same.

Manually tested that HotReload is able to pick the value after removing it from Blazor

dotnet watch ⌚ [BlazorWasmHotReloadV2Sdk (net10.0)] Project 'BlazorWasmHotReloadV2Sdk (net10.0)' specifies capabilities: 'TEST Baseline AddMethodToExistingType AddStaticFieldToExistingType NewTypeDefinition ChangeCustomAttributes AddInstanceFieldToExistingType GenericAddMethodToExistingType GenericUpdateMethod UpdateParameters GenericAddFieldToExistingType'

Contributes to dotnet/aspnetcore#61272

@maraf maraf added this to the 10.0.0 milestone Jul 17, 2025
@maraf maraf requested review from pavelsavara and javiercn July 17, 2025 08:57
@maraf maraf self-assigned this Jul 17, 2025
@Copilot Copilot AI review requested due to automatic review settings July 17, 2025 08:57
@maraf maraf requested review from lewing and akoeplinger as code owners July 17, 2025 08:57
@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Jul 17, 2025
@maraf
Copy link
Member Author

maraf commented Jul 17, 2025

cc @tmat

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 migrates WebAssembly Hot Reload capabilities configuration from Blazor-specific settings to the broader WasmSDK, making Hot Reload functionality available for all WebAssembly browser scenarios. This change supports the introduction of a new HotReload package in the SDK that will be automatically referenced by WasmSDK.

Key changes:

  • Moves .NET version detection logic to an earlier PropertyGroup for reuse
  • Adds WebAssemblyHotReloadCapabilities property with framework-specific capability sets
  • Removes duplicate version detection code from the _ResolveWasmConfiguration target

Copy link
Contributor

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

@maraf
Copy link
Member Author

maraf commented Jul 17, 2025

/ba-g Timeouts are covered in other architecture legs

@maraf maraf merged commit 43d7609 into dotnet:main Jul 17, 2025
30 of 33 checks passed
@maraf maraf deleted the BrowserHotReloadCapabilities branch July 17, 2025 15:39
Copy link
Member

@tmat tmat left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants