Skip to content

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

Description

@adrianhall

Summary

App.xaml.cs calls the now-obsolete WindowExtensions.EnableHotReload(Window) API, producing this warning on every head:

App.xaml.cs(57,9): warning UNO0008: 'WindowExtensions.EnableHotReload(Window)' is obsolete: 'Use the UseStudio() method instead if using the Uno.SDK, otherwise see https://aka.platform.uno/UNO0008 for more details.' (https://aka.platform.uno/UNO0008)

CI run: https://github.com/CommunityToolkit/Datasync/actions/runs/29093946725 (all todoapp-uno / * jobs)

This warning already existed before #524's Uno Platform 5 -> 6 bump (confirmed locally on net10.0-desktop under both Uno.Sdk 5.6.54 and 6.5.36) - it's not new, just newly visible now that CI actually builds this sample end-to-end (see #524/#525/#526/#533).

Root cause

TodoApp.Uno.csproj already uses the Uno.Sdk style project (<Project Sdk="Uno.Sdk">), so per Uno's own guidance the EnableHotReload(Window) extension method call in App.xaml.cs should be replaced with the UseStudio() builder method instead.

Suggested fix

In App.xaml.cs, replace the EnableHotReload(...) call with .UseStudio() on the host/app builder chain, per https://aka.platform.uno/UNO0008. Low risk, purely a hot-reload developer-experience API swap with no runtime behavior change for a normal (non-hot-reload) build/run.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions