Skip to content

MapStaticAssets returns empty files when used with <Content Link=... /> #63570

@TomGathercole

Description

@TomGathercole

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When adding assets to the wwwroot folder using <Content Link=... />, they are correctly fingerprinted and recognized through @Assets, but they return blank content:

Image

This does work correctly after publishing

Expected Behavior

Assets added through <Content Link=.../> are fingerprinted and the correct content is returned

Steps To Reproduce

Repro added here:
https://github.com/TomGathercole/contentlinkrepro

  • Run dotnet new blazor -ai -int Auto
  • Add a new css file outside of wwwroot
  • Add a <Content Link=... /> inside wwwroot, and add the styles to App.razor using @Assets syntax

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.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