Skip to content

PublishWithContainerFiles + ASP.NET Core Static Assets #19768

Description

@fowl2

Is your feature request related to a problem? Please describe the problem.

PublishWithContainerFiles (with eg. AddViteApp for the "Static frontend served by a backend"), copies files after the backend build has completed.

This means that ASP.NET Core's "Static Asset" build time compression and fingerprinting doesn't include those files.

The means my static assets don't have etags and aren't compressed unless I do something (I haven't worked out exactly what yet). This should work out of the box.

Describe the solution you'd like

Simplest would be to delay the backend build until after the front end files are copied. Not ideal.

Better would be for the fingerprinting and compression process to run as part of the copy to the container image process. Alternatively add the right dependencies to the backend build so that it waits if needed and everything continues in parallel if possible.

Maybe at least add some docs.

Activity

  1. added
    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
    on Aug 28, 2026
  2. fowl2 commented on Aug 28, 2026

    @fowl2
    Author

    MihuBot (not a human) (@MihuBot) potentially something to watch when implementation a fix, but not a duplicate. AFAICT Aspire doesn't even try to make FE assets availible to the BE build - it just includes both in the generated container.

  3. joperezr commented on Aug 28, 2026

    @joperezr
    Member
    🤖 Aspire triage pass — 2026-08-28 08:07 UTC

    Area: area-polyglot, area-deployment
    Kind: feature-request
    Repro: partial — scenario described in the "problem" section (no minimal repro project)
    Affected version(s): not specified in body (latest: 13.5 line shipped; 13.6 in progress)
    Severity: S3 — static assets published into the container image skip ASP.NET Core build-time fingerprinting/compression (no etags, uncompressed); app still runs, manual workaround likely exists

    Urgency: ⚪ backlog — no milestone
    Reason: feature request / enhancement (ordering of container-files copy vs. backend static-asset processing); not a regression and not S1/S2

    Suggested owner(s): Sébastien Ros (@sebastienros) (polyglot/JS lead), backup Mitch Denny (@mitchdenny) (container-files publish)
    Evidence:

    Confidence: medium
    Needs human?: no

  4. fowl2 commented on Aug 28, 2026

    @fowl2
    Author

    Probably related to #17563.

    It seems like the current extensibility points don't really allow connecting container builds together.

    I guess the work around is to use esproj for deployment leaving AddViteApp for debugging or just live without angular dev server console output in the dashboard 😢.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-deploymentarea-polyglotIssues related to polyglot apphostsneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownerstriage:bot-seenAspire triage bot has seen this issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions