MonorailCss.Discovery 0.1.1

There is a newer prerelease version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonorailCss.Discovery" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MonorailCss.Discovery" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="MonorailCss.Discovery" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MonorailCss.Discovery --version 0.1.1
                    
#r "nuget: MonorailCss.Discovery, 0.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MonorailCss.Discovery@0.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MonorailCss.Discovery&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=MonorailCss.Discovery&version=0.1.1
                    
Install as a Cake Tool

MonorailCSS.Discovery

NuGet

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/.cs compiled output, including those in referenced NuGet packages.
  • Source files (.razor, .cshtml, .cs, .html, …) for live class extraction during development. Under dotnet watch this 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/.mjs shipped 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed