Skip to content

Conversation

tmat
Copy link
Member

@tmat tmat commented Oct 9, 2025

Do not call the runtime to apply empty deltas. The change applies the same condition we use in 10.0 to 9.0.

Description

The 9.0 runtime does not ignore empty deltas -- the change to ignore them was only implemented in .NET 10: dotnet/runtime#120333.

When debugging WASM app with the new WASM ICoreDebug-based debugger, the debugger applies deltas and the agent is sent empty deltas. The expectation is that the deltas are ignored and the only action that the agent performs is invoking metadata update handlers.

If the deltas are not skipped in this scenario the 9.0 runtime throws an exception:
"Applying deltas through the debugger and System.Reflection.Metadata.MetadataUpdater.ApplyUpdate simultaneously is not supported"

If we didn't call the agent at all the deltas would be correctly applied by the new WASM debugger but the metadata update handlers wouldn't be executed and thus the app wouldn't function properly (caches not invalidated, UI not refreshed).

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2571149

Customer Impact

Hot Reload is broken for customers debugging WASM projects from Visual Studio 2026 using the new ICorDebug-based WASM debugger and projects targeting net9.0.

Regression?

  • Yes
  • No

Partial regression: Previous versions of VS did not fail to apply change entirely, but also did not invoke update handlers, which leaves the app in partially-updated state.
Fixing that in VS caused regression in net90 projects because they lack the condition added in this change.

Risk

  • High
  • Medium
  • Low

The condition is trivial and well tested in net10.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.3

  • Make necessary changes in eng/PatchCo

@tmat tmat requested review from Copilot and removed request for Copilot October 9, 2025 19:10
@tmat tmat requested a review from a team as a code owner October 9, 2025 19:10
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0.x milestone Oct 9, 2025
@tmat tmat added this to Servicing Oct 9, 2025
@lewing lewing added Servicing-consider Shiproom approval is required for the issue Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Oct 10, 2025
@wtgodbe wtgodbe merged commit 9f57035 into dotnet:release/9.0 Oct 10, 2025
25 checks passed
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 9.0.x, 9.0.11 Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Servicing-approved Shiproom has approved the issue

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants