MapStaticAssets at runtime
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.
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()).