Skip to content

[Blazor] Cannot embed the wwwroot with isolated css folder #62696

Open
@stormenergy91

Description

@stormenergy91

Hi, I come from projects written in ASP.NET Core MVC, where we use PublishSingleFile, SelfContained, and <EmbeddedResource Include="wwwroot\**" /> directives, and everything works perfectly. This is useful in cases where having a single file for production environments makes updates easier — including static content.

Now we are moving to Blazor Server (using render mode InteractiveServer), but we're experiencing issues with isolated CSS, both in the main project and in the Razor libraries we use. The problem is that <EmbeddedResource Include="wwwroot\**" /> includes files before the isolated CSS are built. We tried configuring custom Targets on the project, but none of them worked.

Is there a way to embed the wwwroot folder including all the isolated CSS, so we can have a single-file deployment for production?

Metadata

Metadata

Assignees

No one assigned

    Labels

    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