MonorailCss.Discovery
0.1.3
See the version list below for details.
dotnet add package MonorailCss.Discovery --version 0.1.3
NuGet\Install-Package MonorailCss.Discovery -Version 0.1.3
<PackageReference Include="MonorailCss.Discovery" Version="0.1.3" />
<PackageVersion Include="MonorailCss.Discovery" Version="0.1.3" />
<PackageReference Include="MonorailCss.Discovery" />
paket add MonorailCss.Discovery --version 0.1.3
#r "nuget: MonorailCss.Discovery, 0.1.3"
#:package MonorailCss.Discovery@0.1.3
#addin nuget:?package=MonorailCss.Discovery&version=0.1.3
#tool nuget:?package=MonorailCss.Discovery&version=0.1.3
MonorailCSS.Discovery
Runtime CSS class discovery for MonorailCSS. It scans the IL of loaded assemblies — plus any source files you point it at — to find the utility classes your app actually uses, then compiles them with MonorailCSS. No source generators, no MSBuild tasks, no Node toolchain.
This is the companion package for development-time and runtime CSS generation (e.g. a Blazor app serving /css/app.css live with hot reload). For build-time CSS generation that ships a static stylesheet, use MonorailCss.Build.Tasks instead.
What it scans
- Loaded assemblies via in-memory metadata (
Assembly.TryGetRawMetadata) — class-shaped string literals baked into.razor/.cscompiled output, including those in referenced NuGet packages. - Source files (
.razor,.cshtml,.cs,.html, …) for live class extraction during development. Underdotnet watchthis reaches across project boundaries: the source directories of referenced, locally-built projects (located from their build PDBs) are watched too, so editing a component in a referenced library regenerates CSS even though its source lives outside the running app. - Static web assets (
.js/.mjsshipped by Razor Class Libraries under_content/), so component libraries that build markup at runtime are covered.
Assemblies marked [assembly: MonorailCssNoScan] — including the MonorailCSS framework assemblies — are skipped automatically. Framework assemblies (Microsoft.*, System.*, …) are excluded by default. You can exclude additional assemblies (e.g. icon packs whose IL is full of class-shaped strings) via options.
Basic usage (ASP.NET Core / Blazor)
builder.Services.AddMonorailCssDiscovery(options =>
{
options.SourceCssPath = "wwwroot/app.css"; // @theme / @apply / @utility / @source directives
});
// ...
app.MapMonorailCss("/css/app.css"); // serves generated CSS, regenerates on change in development
In your markup, reference the endpoint exactly as you would a static stylesheet:
<link rel="stylesheet" href="/css/app.css" />
A common pattern is hybrid: run Discovery in Development for instant feedback, and let MonorailCss.Build.Tasks emit a static app.css for Release so production serves a plain file with no scanning at startup.
See the MonorailCSS documentation for configuration, theming, and the full directive reference.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- MonorailCss (>= 0.1.3)
-
net9.0
- MonorailCss (>= 0.1.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MonorailCss.Discovery:
| Package | Downloads |
|---|---|
|
Pennington.MonorailCss
MonorailCSS integration for Pennington providing utility-first CSS generation |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.4-alpha.0.3 | 44 | 7/12/2026 |
| 0.1.4-alpha.0.2 | 48 | 7/12/2026 |
| 0.1.4-alpha.0.1 | 51 | 7/12/2026 |
| 0.1.3 | 126 | 7/12/2026 |
| 0.1.3-alpha.0.1 | 53 | 7/10/2026 |
| 0.1.2 | 229 | 7/10/2026 |
| 0.1.2-alpha.0.5 | 55 | 7/10/2026 |
| 0.1.2-alpha.0.4 | 120 | 7/7/2026 |
| 0.1.2-alpha.0.3 | 60 | 6/23/2026 |
| 0.1.2-alpha.0.2 | 60 | 6/23/2026 |
| 0.1.2-alpha.0.1 | 61 | 6/23/2026 |
| 0.1.1 | 222 | 6/23/2026 |
| 0.1.1-alpha.0.5 | 83 | 6/22/2026 |
| 0.1.1-alpha.0.3 | 65 | 6/22/2026 |
| 0.1.1-alpha.0.2 | 60 | 6/21/2026 |
| 0.1.0 | 100 | 6/21/2026 |
| 0.0.5-alpha.0.175 | 60 | 6/21/2026 |
| 0.0.5-alpha.0.171 | 59 | 6/21/2026 |
| 0.0.5-alpha.0.170 | 65 | 6/20/2026 |
| 0.0.5-alpha.0.169 | 58 | 6/20/2026 |