If modify project name of blazor app, scope string in bundled css didn't matched in html tag.

Zang-Ho Bae 26 Reputation points
2021-01-05T06:25:55.16+00:00

why is this?

how can i solve this?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,479 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Brando Zhang-MSFT 3,361 Reputation points Microsoft Vendor
    2021-01-06T08:42:10.893+00:00

    As far as I know, CSS isolation occurs at build time. During this process, Blazor rewrites CSS selectors to match markup rendered by the component. These rewritten CSS styles are bundled and produced as a static asset at {PROJECT NAME}.styles.css, where the placeholder {PROJECT NAME} is the referenced package or product name.

    If you modify the project name, you should also modify the index.html css reference as below:

    53956-971.png

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Pavel Purma 1 Reputation point
    2021-01-10T11:15:34.84+00:00

    Hi, you have to clean project after rename. Delete bin and obj folders will help.

    0 comments No comments