MonorailCss.Discovery
0.1.1
See the version list below for details.
dotnet add package MonorailCss.Discovery --version 0.1.1
NuGet\Install-Package MonorailCss.Discovery -Version 0.1.1
<PackageReference Include="MonorailCss.Discovery" Version="0.1.1" />
<PackageVersion Include="MonorailCss.Discovery" Version="0.1.1" />
<PackageReference Include="MonorailCss.Discovery" />
paket add MonorailCss.Discovery --version 0.1.1
#r "nuget: MonorailCss.Discovery, 0.1.1"
#:package MonorailCss.Discovery@0.1.1
#addin nuget:?package=MonorailCss.Discovery&version=0.1.1
#tool nuget:?package=MonorailCss.Discovery&version=0.1.1
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="https://webproxy.poorya-velaei-d67.workers.dev/https://www.nuget.org/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.1)
-
net9.0
- MonorailCss (>= 0.1.1)
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.2-alpha.0.3 | 25 | 6/23/2026 |
| 0.1.2-alpha.0.2 | 30 | 6/23/2026 |
| 0.1.2-alpha.0.1 | 27 | 6/23/2026 |
| 0.1.1 | 57 | 6/23/2026 |
| 0.1.1-alpha.0.5 | 75 | 6/22/2026 |
| 0.1.1-alpha.0.3 | 52 | 6/22/2026 |
| 0.1.1-alpha.0.2 | 49 | 6/21/2026 |
| 0.1.0 | 89 | 6/21/2026 |
| 0.0.5-alpha.0.175 | 50 | 6/21/2026 |
| 0.0.5-alpha.0.171 | 46 | 6/21/2026 |
| 0.0.5-alpha.0.170 | 53 | 6/20/2026 |
| 0.0.5-alpha.0.169 | 45 | 6/20/2026 |
| 0.0.5-alpha.0.168 | 267 | 6/13/2026 |
| 0.0.5-alpha.0.167 | 72 | 6/12/2026 |
| 0.0.5-alpha.0.166 | 60 | 6/12/2026 |
| 0.0.5-alpha.0.165 | 131 | 6/4/2026 |
| 0.0.5-alpha.0.164 | 55 | 6/4/2026 |
| 0.0.5-alpha.0.163 | 59 | 6/3/2026 |
| 0.0.5-alpha.0.162 | 76 | 5/29/2026 |
| 0.0.5-alpha.0.161 | 67 | 5/29/2026 |