Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] .NET MAUI Hot Reload Not Working #1675

Open
Wyndal opened this issue Dec 9, 2024 · 5 comments
Open

[BUG] .NET MAUI Hot Reload Not Working #1675

Wyndal opened this issue Dec 9, 2024 · 5 comments
Labels
area-hotreload Issues with Hot Reload experiences bug Something isn't working

Comments

@Wyndal
Copy link

Wyndal commented Dec 9, 2024

Describe the Issue

In some areas of our App, Hot Reload doesn't work at all.

Steps To Reproduce

Example of Hot Reload not working:

  1. In any environment (provided one is QA), login in to an account
  2. Open the HomePageView.xaml
  3. Search for "{localize:Localize AssignmentsLabel}" - line 719 at the time I'm writing this
  4. Modify the text property of that label

You can try this with other labels on the same page. Trying searching "Community" and modifying that as well.

Note: I had to drastically reduce the resolution of this video in order to upload it to GitHub. The higher resolution video should be available internally.

hot-reload-homepageview-420p.mov

Expected Behavior

I expect the "Assignment" or "Community" header in the UI to change via Hot Reload.

Environment Information

OS: Mac OS Sequoia 15.0.1
.NET SDK: 8.0.402
.NET Runtime: 8.0.11

VS Code Extensions:
.NET MAUI: 1.6.14
C#: 2.59.14
C# Dev Kit: 1.15.2
.NET Install Tool: 2.2.3

@Wyndal Wyndal added the bug Something isn't working label Dec 9, 2024
@BretJohnson BretJohnson added the area-hotreload Issues with Hot Reload experiences label Dec 10, 2024
@emilytobler
Copy link

Attempted to reproduce - could not get hot reload working with iphone 16 on 18.2. However could get Android working in the same spot with a Pixel 6 API 34.

@BretJohnson
Copy link
Member

I see the errors below reported on the HomePageView.xaml page, with local:BasePageView.Resources and <ContentPage.Resources> both definining Resources for HomePageView.xaml. That seems to be related to the issue - what the XAML parser encounters errors like this, it won't apply Hot Reload changes. When I remove the top Resources section, the changes are applied.

Image

That said, in this case the two Resources definitions both look valid here & our MAUI Hot Reload XAML parser should likely be updated to accommodate this case. I'm also not sure why this isn't an issue for Android, just for iOS.

@BretJohnson
Copy link
Member

BretJohnson commented Dec 10, 2024

@etvorun - Let's discuss this tomorrow. I can show you the XAML in question, as we have the app source.

@BretJohnson
Copy link
Member

Updating HomePageView.xaml to just set Resources once rather than twice should fix this issue. @Wyndal - can you try that and confirm.

@Wyndal
Copy link
Author

Wyndal commented Dec 10, 2024

Per your suggestion, I moved the BasePageView resources into the ContentPage resources section, and this fixed the problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hotreload Issues with Hot Reload experiences bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants