question

AndrewBroughton-9811 avatar image
0 Votes"
AndrewBroughton-9811 asked RobCaplan edited

Blazor server demo app doesn't load css on MacOS

Created a Blazor Server app from the supplied templates in both VS2022 (Windows) and VS2019 (MacOS).
Both work properly in the IDE, and when published for Windows, it works fine there.
However, when published for MacOS, neither build loads the css.
In the debug window of both Safari and Firefox on MacOS, it shows 404 for all CSS files. They are definitely appearing in the folder under wwwroot, and the main html loads properly, just not the CSS.
Can't find any discussion of this issue, and have no idea what is causing this.

Any suggestions?

dotnet-aspnet-core-blazor
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndrewBroughton-9811 avatar image
0 Votes"
AndrewBroughton-9811 answered AndrewBroughton-9811 edited

Works if I move the contents of the publish folder to my home folder on my Mac.

Any idea how to tell Blazor server to look at the current folder instead of my home folder for the css and favicon files?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Bruce-SqlWork avatar image
0 Votes"
Bruce-SqlWork answered

most likely the paths are incorrect. on macOS (like unix) ~/path, is handled by the o/s and ~/ means users home folder.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.