Repository navigation
fix(hr): Re-point hot-reload baselines to the RID-specific build outputs - #23798
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 producedFound 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
CompilationOutputInfois now re-pointed to the assembly the running application was actually built from:RuntimeIdentifiercaptured from the running application's build (already present in theConfigureServerMSBuild 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).ref/refintfolders excluded).project not builtinside 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-x64output and C#/XAML edits produce and apply metadata updates; desktop/wasm heads (no RID split) are unaffected.PR Checklist ✅
Screenshots Compare Test Runresults.