A .NET 9 library for serving embedded Single Page Applications (SPAs) directly from assembly resources in ASP.NET Core applications.
- Serve static files (HTML, CSS, JS, images, fonts, etc.) directly from embedded resources
- Comprehensive content type handling for common web assets
- Lightweight middleware for ASP.NET Core pipeline
- Automatic fallback to
index.htmlfor SPA routing
The library provides middleware to serve embedded static files from assembly resources:
app.UseMiddleware<EmbeddedStaticFileMiddleware>(assembly, "YourApp.wwwroot");Supports proper MIME types for:
- Web assets (HTML, CSS, JavaScript)
- Images (PNG, JPEG, SVG, WebP, etc.)
- Fonts (WOFF, WOFF2, TTF, OTF)
- Media files (MP4, MP3, etc.)
- Documents and archives
- .NET 9.0
- ASP.NET Core
This is a library project that compiles to a .dll for use in other applications.