microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Changing `ResourceDictonary` xaml file requires cleaning the project

Open karmeye opened this issue 1 year ago • 1 comments

Describe the bug

When I make changes in Resource Dictionary xaml files I have to clean the project for the changes to take effect. Hot reload doesn't work, even stopping and running the app again does not work. I have to rebuild the project that contains the xaml file.

Steps to reproduce the bug

  1. Create a Blank App (WinUI 3) project and a Class Library (WinUI 3)
  2. Make the blank app project dependent on the class library
  3. Move the MainWindow from the blank app project to the class library
  4. Add a Resource Dictionary to the class library that styles some control in MainWindow
  5. Changes made in the resource dictionary will only be reflected in the UI after cleaning/rebuilding the class library and running the blank app project again.

Expected behavior

  • Changes should show without cleaning the project
  • If hot reload is enabled changes should occur immediately

Screenshots

No response

NuGet package version

Windows App SDK 1.4.5: 1.4.240211001

Packaging type

Unpackaged

Windows version

Windows 11 version 22H2 (22621, 2022 Update)

IDE

Visual Studio 2022

Additional context

Only reason I use a Class Library project instead of putting the resource dictionary and windows/controls directly in the Blank App project is that I'm trying to open a WinUI window from a WinForm project, so I have to reference a class library containing the WinUI window (see https://github.com/microsoft/WindowsAppSDK/discussions/4203)

karmeye avatar Feb 20 '24 03:02 karmeye

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Feb 22 '24 17:02 github-actions[bot]