Skip to content

I'm experiencing the same issue as Blazor: Error on adding new scoped CSS since last update #55998 #63875

@Rod-at-DOH

Description

@Rod-at-DOH

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Hi @javiercn I am having the same issue that was reported last year. I'm using VS 2022 Enterprise Edition. I've added a CSS file, which I tried to associate with a .razor file. It looks fine, within VS 2022:

Image

However, I get "The scoped css file (filename.razor.css) was defined but no associated razor component or view was found for it.."

I get that error when I build the solution within VS 2022. And I get the same error when I do a dotnet build in the command line.

I've edited the .csproj file but I don't see any Content ItemGroup, nor a <Content Remove... in the .csproj file.

What else should I try?

Expected Behavior

I expected the addition of the .CSS file to the .razor file to work without an problems.

Steps To Reproduce

I'm sorry, but this project is within our GitHub Enterprise organization, so I can't share it with you.

Exceptions (if any)

no exceptions

.NET Version

9.0.304

Anything else?

Here is what I got when I ran dotnet build:

FPTimetrackCore.Client failed with 1 error(s) (0.4s)
Pages\InputTimeForUser.razor.css : error BLAZOR102: The scoped css file 'Pages\InputTimeForUser.razor.css' was defined but no associated razor component or view was found for it.
FPTimetrackCore.Library succeeded (1.7s) → FPTimetrackCore.Library\bin\Debug\net9.0\FPTimetrackCore.Library.dll
FPTimetrackCore.API succeeded (1.8s) → FPTimetrackCore.API\bin\Debug\net9.0\FPTimetrackCore.API.dll
FPTimetrackCore.DataActionsAPI succeeded with 8 warning(s) (0.9s) → FPTimetrackCore.DataActionsAPI\bin\Debug\net9.0\FPTimetrackCore.DataActionsAPI.dll
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(100,36): warning CS8600: Converting null literal or possible null value to non-nullable type.
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(222,34): warning CS8600: Converting null literal or possible null value to non-nullable type.
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(270,31): warning CS8600: Converting null literal or possible null value to non-nullable type.
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(298,29): warning CS8600: Converting null literal or possible null value to non-nullable type.
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(366,29): warning CS8600: Converting null literal or possible null value to non-nullable type.
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(58,36): warning CS8600: Converting null literal or possible null value to non-nullable type.
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\Program.cs(56,17): warning CS8321: The local function 'GetConnectionObject' is declared but never used
C:\GitHub\PROD\FPTimetrackCore\FPTimetrackCore\FPTimetrackCore.DataActionsAPI\SetConnectionString.cs(10,22): warning CS0169: The field 'SaveData.productionData' is never used

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Attention 👋This issue needs the attention of a contributor, typically because the OP has provided an update.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions