maui: Blazor CSS Isolation bundle is not deployed to local iOS device

Description

When deploying a blazor app to a locally attached iOS device the “temp” folder that appears to be staging all the files for the production of the ipa is missing the CSS file that is the bundle of all the css isolation files MyBlazorApp.styles.css which should be in the wwwroot folder. This seems to be working for Android, windows and even the iOS simulator. It’s only locally attached devices where there’s an issue.

image

As you can see from the shot above the AssemblyName.styles.css is missing in the folder.

Steps to Reproduce

  1. Create default Blazor hybrid maui app
  2. Pair with Mac & startup iTunes
  3. Start with Debugging, targeting iOS / Local device

I’ve noticed (as have others) that it is sometimes necessary to reset the SDK to Microsoft.NET.Sdk (i.e. remove .Razor) and reload the solution in order for the local device to appear as a debug target. This seems to happen from time to time which is annoying but not fatal.

Open the ipa file that is produced at .\AppData\Local\Temp\Xamarin\HotRestart\Signing\MyBlazorApp.app\out\MyBlazorApp.ipa as a zip and you can see that the CSS file is missing from \Payload\MyBlazorApp.app\wwwroot as well.

Version with bug

Release Candidate 3 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15

Did you find any workaround?

Adding the file manually to this folder does not help. I have not found a workaround.

Relevant log output

Build logs do not indicate any sort of error has occurred. All logs appear normal.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 22 (8 by maintainers)

Most upvoted comments

This should be fixed in the upcoming Visual Studio 17.4.0 Preview 3 release.

@MackinnonBuck I’ve also uploaded the build folders from the Local Device Build (Windows) and Remote Device Build (MacBook) on to the ticket (https://developercommunity.visualstudio.com/t/Blazor-CSS-Isolation-bundle-is-not-deplo/10131317) via a comment.

Ok, submitted here:

https://developercommunity.visualstudio.com/t/Blazor-CSS-Isolation-bundle-is-not-deplo/10131317

I’ve included binlogs for Local Device (which doesn’t work properly as above) and also for Remote Device (which does work). For each, I rebuilt first, then started debugging.

Using Local Device, this created 3 binlogs (Rebuild, Build, GetAppBundleDir). Using Remote Device, this created 4 binlogs (Rebuild, Build, GetAppBundleDir, GetAppBundleDir).

I’ve also included the debug.log for each case. Note that Local Device has issues resolving assemblies whereas Remote Device does not.

Also - during this process I noticed that the splash screens are different so I’ve included screen shots for both Local and Remote Devices along with app screenshots for each demonstrating the issue with the missing bundled CSS.

Hope that helps! Happy to collect anything else you need.

Blaine

@BlaineM-SeriouslyRAD file an issue through the visual studio report a problem UI and you can attach them there, link it here and that way we can access the attachments safely.