79267995

Date: 2024-12-10 11:13:38
Score: 0.5
Natty:
Report link

Same thing happened to me, and I trawled a lot of StackOverflow queries that suggested cleaning and rebuilding would sort it, which it didn't.

Then I realised that there must be something about the blazor compiler only rebuilding when it thinks the original sources have changed.

So I opened /Layout/NavMenu.razor.css and Layout/MainLayout.razor.css, added a blank line and saved them. Then the publish worked - it must have checked the modified-dates on these files and decided that it didn't need to regenerate the scoped versions. Changing that modified time caused it to re-transpile them.

Note that you might have other transpiled CSS files (likely native Blazor ones, rather than your own components) that you may need to touch to force than trans-compilation.

Reasons:
  • Blacklisted phrase (1): StackOverflow
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: skotl