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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions