blazor

Static styles.css issues after renaming Blazor project


If I start a Blazor server from scratch. Then right-click the project and click rename.

All the namespaces change(EditedProjectName.Pages) but the using statements keep the old references(OriginalProjectName.Pages).

This is fairly easy to overcome with Find and replace OriginalProjectName.Pages => replace with => EditedProjectName.Pages

Now the issue. Seemly randomly the site launches without proper css. The same output as I get if I comment out the static CSS in {PROJECT NAME}.styles.css which makes the sidebar etc disappear incorrect blazor index page view

Any idea of how the project name change can cause this issue and how I can solve or troubleshoot it?


Solution

  • The issue disappeared when I did a Build|Clean and a Build|Rebuild.