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
Copy link
Contributor

Hi @@tmat. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document.
Otherwise, please add tell-mode label.

@tmat tmat added this to Servicing Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant