Skip to content

fix: replace obsolete EnableHotReload with UseStudio in TodoApp.Uno#552

Merged
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/536
Jul 10, 2026
Merged

fix: replace obsolete EnableHotReload with UseStudio in TodoApp.Uno#552
adrianhall merged 1 commit into
CommunityToolkit:mainfrom
adrianhall:issues/536

Conversation

@adrianhall

Copy link
Copy Markdown
Collaborator

Summary

App.xaml.cs calls the now-obsolete WindowExtensions.EnableHotReload(Window) API, producing a UNO0008 warning on every todoapp-uno / * CI job build.

Fix

Per UNO0008, Uno Platform 5.5+ deprecated Window.EnableHotReload() for Uno.Sdk-style projects (which TodoApp.Uno.csproj already is) in favor of Window.UseStudio() — a drop-in, same-signature replacement. Uno's own solution templates use exactly this pattern (MainWindow.UseStudio(); inside #if DEBUG).

 #if DEBUG
-        MainWindow.EnableHotReload();
+        MainWindow.UseStudio();
 #endif

Low risk, purely a hot-reload developer-experience API swap with no runtime behavior change for a normal (non-hot-reload) build/run.

Testing

  • dotnet restore samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj -p:TargetFramework=net10.0-desktop
  • dotnet build samples/todoapp/TodoApp.Uno/TodoApp.Uno/TodoApp.Uno.csproj -f net10.0-desktop --configuration Debug --no-restore
    • Build succeeded, 0 errors, and the UNO0008 warning no longer appears.
    • Remaining warnings (NU1510 x3, CS8618 x2, CS8622, Uno0001) are pre-existing and unrelated to this change.
  • Other heads (android/ios/maccatalyst/windows/browserwasm) not built locally (missing workloads/Xcode/Windows runner here); same code path executes on every head, so CI's build-samples-todoapp-uno.yml matrix will validate them on this PR.

Fixes #536

@adrianhall adrianhall merged commit bc444a7 into CommunityToolkit:main Jul 10, 2026
20 checks passed
@adrianhall adrianhall deleted the issues/536 branch July 10, 2026 17:35
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.

TodoApp.Uno: UNO0008 EnableHotReload obsolete warning in App.xaml.cs

1 participant