maui icon indicating copy to clipboard operation
maui copied to clipboard

Maui Blazor CSS HotReload not working on iOS Device and Simulator

Open 1cue-jrupp opened this issue 5 months ago • 6 comments

Description

We're experiencing issues with HotReload of Changes in CSS files in a MAUI Blazor Project on iOS Devices and in the iOS Simulator.

For other changes the HotReload works successfully (e.g. changes in .razor files, also inline CSS styles). But if we make changes in .css files from wwwroot they are never applied. Often also rebuilding the whole App makes the css changes not showing up. Deleting obj and bin folder and rebuiding afterwards makes the css changes taking effect.

On Windows and Android the HotReload of CSS works without issues.

We're using latest Visual Studio Windows 17.14.3

Steps to Reproduce

  1. Create a default Project for .NET MAUI Blazor in Visual Studio
  2. Run on iOS Device or in iOS Simulator
  3. Change something in the wwwroot/css/app.css
  4. Changes not showing up, alltough HotReload for .razor is working fine

Link to public reproduction project repository

No response

Version with bug

8.0.100 SR10

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output


1cue-jrupp avatar May 31 '25 10:05 1cue-jrupp

We've found some similar issues:

  • #28134 , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

similar-issues-ai[bot] avatar May 31 '25 10:05 similar-issues-ai[bot]

/triage

jsuarezruiz avatar Jun 02 '25 05:06 jsuarezruiz

Triage Summary

Labels will be applied to indicate the affected area (Blazor and Tooling), the specific platform (iOS), and the fact that this issue is a potential regression.

This issue is a regression as the Hot Reload for CSS previously worked in .NET MAUI but no longer functions correctly on iOS devices.

Detailed Summary and Actions

Summary of the triage:

  • The issue involves Blazor and concerns a problem with Hot Reload functionality, specifically for CSS changes not being applied.
  • The tooling aspect is relevant as this pertains to development tools and features like Hot Reload and Live Preview.
  • This is identified as a potential regression since the feature previously worked in .NET MAUI.
  • The issue specifically affects the iOS platform, including iOS devices and the simulator, while other platforms like Windows and Android are unaffected.

Summary of the actions that will be performed:

Action Item Description
Apply Label area-blazor The issue relates to the Blazor framework, particularly with Hot Reload in a Blazor project.
Apply Label area-tooling The Hot Reload issue pertains to development tooling features.
Apply Label potential-regression The issue is flagged as a potential regression since the feature previously worked but no longer functions as intended.
Apply Label platform/ios The problem is specific to iOS platforms, affecting both devices and simulators.

This entire triage process was automated by AI and mistakes may have been made. Please let us know so we can continue to improve.

github-actions[bot] avatar Jun 02 '25 05:06 github-actions[bot]

Thanks for the issue report @@1cue-jrupp! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

Thanks for the issue report @@1cue-jrupp! This issue appears to be a problem with Visual Studio (Code), so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS (Code).

If you encounter a problem with Visual Studio or the .NET MAUI VS Code Extension, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or .NET MAUI VS Code Extension repository to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.

@spadapet Is this something your team is responsible for?

javiercn avatar Jun 17 '25 13:06 javiercn

@javiercn I'll message you on Teams about ownership.

I did make a fix in this MAUI repo for iOS just a few months ago:

  • https://github.com/dotnet/maui/pull/27812

I wonder what went wrong with it, because it worked at the time. You can put breakpoints in StaticContentHotReloadManager.cs to see what may be going wrong:

spadapet avatar Jun 17 '25 16:06 spadapet