In a Blazor WebAssembly .NET Core hosted application, after changing the {PROJECT NAME}.Client project name to "{PROJECT NAME}.Admin" (changing the client project name), scope identifies for CSS isolation in the {PROJECT NAME}.Admin.styles.css file and rendered objects in the DOM are different.
What I did
I created a .NET core hosted Blazor WebAssembly application with authentication. Ran the application. Worked fine.
Then I changed the project name of {PROJECT NAME}.Client project to "{PROJECT NAME}.Admin". And changed basically every where there was "Client" to "Admin".
- Every where the name space was mentioned
- The Client Folder in the project folder
Then I added the project references.
When I ran the project... This was the landing page.
The Issue
All the functionality works fine. All the components are rendered. But only Bootstrap styling is applied to the MainLayout and NavMenu components as they use CSS isolation. The isolated CSS files generated files scope identities aren't the same as what is rendered to the DOM.
Image of {PROJECT NAME}.Admin.styles.css file
The page renders fine if I change the scope Identities manually. But it resets when I Run the application a next time.
I'm just play around with Blazor. So I'm expecting a fix to this problem rather than some alternate method or work around to do the styling. I'm new to online forums. Sorry for providing unnecessary information or providing less information. Please request any additional information needed.
Thanks! in advance.