question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blazor CSS Isolation bundle is not deployed to local iOS device

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:22 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
MackinnonBuckcommented, Oct 6, 2022

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

1reaction
BlaineM-SeriouslyRADcommented, Aug 25, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Blazor CSS isolation not adding the link tag to load ...
2 Answers. You have to add the tag for the bundled CSS file manually to the host page. Blazor does not add this...
Read more >
Edited css files in project not updating in deployed app
So I have a Blazor server app which is nearing release - up until now it has been using the default styles from...
Read more >
Spurious blazor errors showing in error list that aren't errors
I'm using latest visual studio and .NET 5.0 (now). Basically what happens is I get a number of errors in the error list...
Read more >
Getting Started with MAUI Blazor App in Visual Studio
The above steps creates a multi-targeted .NET MAUI Blazor app that can be deployed to Android, iOS, macOS, and Windows. In MainPage.xaml ,...
Read more >
ASP.NET Core Blazor CSS isolation
Learn how CSS isolation scopes CSS to Razor components, which can simplify CSS and avoid collisions with other components or libraries.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found