microsoft / microsoft-ui-xaml

WinUI: a modern UI framework with a rich set of controls and styles to build dynamic and high-performing Windows applications.
MIT License
6.38k stars 683 forks source link

[WinUI] Hot reload doesn't work for WinUI 3(C++) project #8704

Open XamlTest opened 1 year ago

XamlTest commented 1 year ago

Describe the bug

Hot Reload does not work for WinUI 3 C++ project, the UI changes does not display to the running app while the project is deployed.

This issue does not reproduce on WinUI C# project, only reproduce on C++ project.

Regression info: This issue does not reproduce on 17.5 Preview 1 version.

The old issue https://github.com/microsoft/microsoft-ui-xaml/issues/8008 is closed, so create the new one.

Steps to reproduce the bug

  1. Create a C++ Blank App, Packaged (WinUI 3 in Desktop) project.
  2. Hit F5 to run the project.
  3. Try to make some UI changes, for example: a. Modify content "Click Me" to "Hello world" b. Add a background property to a Button
  4. Check if the changes displayed on the running application

Actual Result: The UI changes does not display to the running application.

Expected behavior

The UI changes display to the running app.

Screenshots

Actual: HotReload

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

OS Build: 22621.1992 VS Build: 17.8.0 Preview 1.0 [34003.148.d17.8] Windows App SDK: 1.3.230602002

AnnYang01 commented 2 months ago

It didn't repro on SDK version 1.5.240627000 and later. image