fix: Fix invalid TFMs used to init project#22992
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the Hot Reload workspace initialization where invalid Target Framework Monikers (TFMs) were being set globally, causing library projects to inherit incompatible TFM values from the head project. The fix prevents TargetFrameworks from being set as a global property during workspace creation, allowing each project to use its own configured TFM while passing the head project's TFM through a separate property (UnoHotReloadTargetFramework).
Changes:
- Removed direct setting of
TargetFrameworksglobal property during Hot Reload workspace initialization - Added validation filter to prevent
TargetFrameworksfrom being set globally, with detailed comments explaining why library projects need independent TFM configuration
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Uno.UI.RemoteControl.Server.Processors/HotReload/ServerHotReloadProcessor.MetadataUpdate.cs |
Removed the line that was setting TargetFrameworks globally, keeping only UnoHotReloadTargetFramework |
src/Uno.UI.RemoteControl.Server.Processors/HotReload/MetadataUpdates/CompilationWorkspaceProvider.cs |
Added filter logic in IsValidProperty to prevent TargetFrameworks from being included in global workspace properties |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-22992/wasm-skia-net9/index.html |
🐞 Bugfix
Fix invalid TFMs used to init project
What is the current behavior? 🤔
When we init the HR workspace, we are setting the TFMs which flows on all projects
What is the new behavior? 🚀
Remove the property and let the project defines it's TFM (except the root one where TFM is configured using the
UnoHotReloadTargetFramework)PR Checklist ✅
Screenshots Compare Test Runresults.Other information ℹ️
Linked to https://github.com/unoplatform/private/issues/926 and unoplatform/uno.toolkit.ui#1565