sdk icon indicating copy to clipboard operation
sdk copied to clipboard

MapStaticAssets at runtime

Open aidapsibr opened this issue 2 weeks ago • 1 comments

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

MapStaticAssets is a great set of reasonable defaults and very attractive as a feature. However, should you wish to use the functionality at run-time to build a generic static file server, the logic is pretty well out of reach which is a shame as the functionality is the most reasonable defaults I've seen in a builder.

Describe the solution you'd like

Refactor the MsBuildTargets to a set of SDK capabilities that can with be called at build time or at runtime via builder WebHost.

Additional context

It may be useful to add API surface area for new content during a process, such as if a user added a new HTML page in a CMS use-case. This would ensure all content could be treated uniformly.

aidapsibr avatar Dec 09 '25 06:12 aidapsibr

Thanks for the suggestion. We're going to backlog this as it would likely be a large effort to make this work.

For others needing static files to get picked up dynamically at runtime, we'd suggest using UseStaticFiles() instead (even though it doesn't provide the same features as MapStaticAssets()).

MackinnonBuck avatar Dec 10 '25 18:12 MackinnonBuck