Skip to content

fix(hr): Re-point hot-reload baselines to the RID-specific build outputs - #23798

Merged
dr1rrb merged 1 commit into
release/stable/6.6from
dev/dr/hr-rid-baseline-align-66
Jul 16, 2026
Merged

dr1rrb merged 1 commit into
release/stable/6.6from
dev/dr/hr-rid-baseline-align-66

Conversation

@dr1rrb

@dr1rrb dr1rrb commented Jul 16, 2026

Copy link
Copy Markdown
Member

GitHub Issue: unoplatform/uno-private#2256

Follow-up of #23791 on release/stable/6.6 (a master port follows separately): with the correct target framework now reported and the workspace correctly restricted, hot reload on Android still produced Found 0 metadata updates — silently.

PR Type:

🐞 Bugfix

What changed? 🚀

The hot-reload workspace evaluates the head project without a RuntimeIdentifier, so EnC captures its baseline from the RID-less intermediate assembly path (obj/Debug/net10.0-android/App.dll). A device deployment however builds RID-specific (obj/Debug/net10.0-android/android-x64/App.dll): the RID-less assembly either does not exist — Roslyn's EnC then treats the project as "not built" (EditSession: mvid == Guid.Empty) and silently emits zero updates for every change, C# and XAML alike — or is a stale twin from an earlier RID-less build whose MVID does not match the deployed module, so emitted deltas would be dropped by the application.

After the target-framework filtering, the kept head flavor's CompilationOutputInfo is now re-pointed to the assembly the running application was actually built from:

  • Trigger is declarative — the RuntimeIdentifier captured from the running application's build (already present in the ConfigureServer MSBuild properties); no filesystem guessing in the decision, and no global property pushed to the workspace (a global RID would relocate the expected outputs of every project reference, which MSBuild's project-to-project protocol builds RID-less).
  • Candidates are accepted by module readability (a valid PE with an MVID — the same primitive Roslyn's EnC uses to decide a project is "built"), preferring the RID-specific path over a potentially stale RID-less twin, with a recursive probe of the evaluated output directory as fallback for custom layouts (reference-assembly ref/refint folders excluded).
  • No more silence: when nothing readable is found, an explicit warning states the probed paths and that hot reload will produce no updates — previously the only trace was project not built inside Roslyn's own EnC session log.

Project references are left untouched: their RID-less evaluated paths are correct.

Validated on an Android app (skia renderer, SDK 6.6 line) by patching the DevServer processors: the baseline is re-pointed to the android-x64 output and C#/XAML edits produce and apply metadata updates; desktop/wasm heads (no RID split) are unaffected.

PR Checklist ✅

The workspace evaluates the head without a RuntimeIdentifier, so EnC
captures its baseline from the RID-less intermediate path. A device
deployment builds RID-specific: the RID-less assembly either doesn't
exist — Roslyn then treats the project as 'not built' and silently
emits zero updates — or is a stale twin whose MVID doesn't match the
deployed module, so the emitted deltas are dropped by the application.

After the target-framework filtering, re-point the kept head flavor's
CompilationOutputInfo to the assembly the running application was
actually built from: trigger is the RuntimeIdentifier captured from
the application's build (declarative — no filesystem guessing in the
decision), candidates are accepted only when their module is readable
(the same primitive Roslyn's EnC uses to decide a project is 'built'),
preferring the RID-specific path over a potentially stale RID-less
twin, with a directory probe fallback for custom output layouts
(reference-assembly folders excluded). When nothing readable is found,
warn explicitly instead of letting EnC no-op silently.

Project references are left untouched: MSBuild's project-to-project
protocol builds them RID-less, their evaluated paths are correct.
@dr1rrb
dr1rrb marked this pull request as ready for review July 16, 2026 21:35
@dr1rrb
dr1rrb merged commit 438b300 into release/stable/6.6 Jul 16, 2026
9 of 11 checks passed
@dr1rrb
dr1rrb deleted the dev/dr/hr-rid-baseline-align-66 branch July 16, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant