Rask.Spa.Hosting
0.24.0
See the version list below for details.
dotnet add package Rask.Spa.Hosting --version 0.24.0
NuGet\Install-Package Rask.Spa.Hosting -Version 0.24.0
<PackageReference Include="Rask.Spa.Hosting" Version="0.24.0" />
<PackageVersion Include="Rask.Spa.Hosting" Version="0.24.0" />
<PackageReference Include="Rask.Spa.Hosting" />
paket add Rask.Spa.Hosting --version 0.24.0
#r "nuget: Rask.Spa.Hosting, 0.24.0"
#:package Rask.Spa.Hosting@0.24.0
#addin nuget:?package=Rask.Spa.Hosting&version=0.24.0
#tool nuget:?package=Rask.Spa.Hosting&version=0.24.0
Rask.Spa.Hosting
ASP.NET Core host for a Rask WebAssembly app written in C# — or any other built single-page app. Part of Rask, a full-stack .NET web framework for teams of any size.
- One call serves the build output with correct MIME types, cache headers that follow what the build
guarantees (content-hashed assets cached hard,
index.htmlnever cached), precompressed siblings, and a SPA fallback that still answers 404 for a missing asset. - The WebAssembly client is published by the host's build. Reference the client project and
dotnet buildpublishes it;MapRaskSparecognises the bundle and serves the runtime files with the right types and compression. Underrask devthe client's build output is served instead, so hot reload reaches the browser. - Depends on nothing else in Rask.
Install
dotnet add package Rask.Spa.Hosting
Or start from a scaffold that already references it: rask new Shop --template wasm-hosted.
Use
// Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRaskSpaHost();
var app = builder.Build();
// Map your API endpoints FIRST — MapRaskSpa ends the pipeline with a fallback to index.html,
// so anything mapped after it is answered with HTML.
app.MapRaskSpa();
app.Run();
Guide: Single-page apps
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Rask.Spa.Hosting:
| Package | Downloads |
|---|---|
|
Rask.Server
The ASP.NET host for Rask, a full-stack .NET web framework, with every battery: database (SQLite or SQL Server, and PostgreSQL with the Rask.Postgres package, picked by Rask:Database:Provider), mediator and query cache, accounts, background jobs, transactional email, cache, file storage, outbox, operator dashboard, durable logs, Web Push, SQLite snapshots and continuous backup. Renders Rask components with live updates over a WebSocket. RaskApp.Create(args).Run<App>() is the whole Program.cs, and RaskApp.Create(args).Serve() the whole server of a WebAssembly client; app.Configure(c => c.Jobs.Off()) is how an app does without one. Depends on Rask, the shared core. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.24.1-alpha.0.154 | 39 | 11/19/2026 |
| 0.24.1-alpha.0.149 | 42 | 11/18/2026 |
| 0.24.1-alpha.0.145 | 46 | 11/18/2026 |
| 0.24.1-alpha.0.141 | 42 | 11/18/2026 |
| 0.24.1-alpha.0.140 | 94 | 11/18/2026 |
| 0.24.1-alpha.0.137 | 51 | 11/18/2026 |
| 0.24.1-alpha.0.136 | 41 | 11/18/2026 |
| 0.24.1-alpha.0.102 | 40 | 11/18/2026 |
| 0.24.1-alpha.0.101 | 46 | 11/17/2026 |
| 0.24.1-alpha.0.100 | 42 | 11/17/2026 |
| 0.24.1-alpha.0.98 | 47 | 11/17/2026 |
| 0.24.1-alpha.0.93 | 39 | 11/17/2026 |
| 0.24.1-alpha.0.91 | 47 | 11/17/2026 |
| 0.24.1-alpha.0.90 | 42 | 11/17/2026 |
| 0.24.1-alpha.0.88 | 50 | 11/17/2026 |
| 0.24.1-alpha.0.52 | 47 | 11/17/2026 |
| 0.24.1-alpha.0.51 | 56 | 11/16/2026 |
| 0.24.1-alpha.0.43 | 51 | 11/16/2026 |
| 0.24.0 | 117 | 11/16/2026 |