MonorailCss.Build.Tasks
0.1.3
See the version list below for details.
dotnet add package MonorailCss.Build.Tasks --version 0.1.3
NuGet\Install-Package MonorailCss.Build.Tasks -Version 0.1.3
<PackageReference Include="MonorailCss.Build.Tasks" Version="0.1.3"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="MonorailCss.Build.Tasks" Version="0.1.3" />
<PackageReference Include="MonorailCss.Build.Tasks"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add MonorailCss.Build.Tasks --version 0.1.3
#r "nuget: MonorailCss.Build.Tasks, 0.1.3"
#:package MonorailCss.Build.Tasks@0.1.3
#addin nuget:?package=MonorailCss.Build.Tasks&version=0.1.3
#tool nuget:?package=MonorailCss.Build.Tasks&version=0.1.3
MonorailCSS.Build.Tasks
MSBuild tasks that compile MonorailCSS output at build time. The task scans your markup and referenced assemblies for utility classes, parses your input CSS for theme variables, custom utilities, and component rules, and writes an optimized static stylesheet. No Node toolchain required.
For development-time / runtime generation with hot reload, use MonorailCss.Discovery instead. The two share the same scanning + compilation core, so they extract the same classes from the same inputs.
Usage
Add the package, then declare an input CSS file and an output path:
<ItemGroup>
<MonorailCss Include="app.css">
<OutputFile>wwwroot/css/app.css</OutputFile>
</MonorailCss>
</ItemGroup>
The CSS is regenerated during build (with timestamp-based incremental skipping). Source scanning is driven entirely by Tailwind v4-style @source and @import directives in your input CSS:
@import "tailwindcss";
@source "../components";
@source inline("bg-red-{50,100,200}");
@theme {
--color-brand-500: #3b82f6;
}
@utility bordered-link {
@apply font-semibold border-b border-current;
}
Excluding assemblies from scanning
Every referenced assembly flows through the IL scanner. Skip ones whose IL embeds class-shaped strings (icon packs, validation libraries) to keep the candidate set focused:
<PropertyGroup>
<MonorailCssExcludeAssemblies>FluentValidation;BadIdeas.Icons.FontAwesome</MonorailCssExcludeAssemblies>
</PropertyGroup>
Assemblies marked [assembly: MonorailCssNoScan] and framework assemblies (Microsoft.*, System.*, …) are excluded automatically.
See the MonorailCSS documentation for the full directive reference, path placeholders, and configuration options.
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- JetBrains.Annotations (>= 2025.2.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.4-alpha.0.3 | 43 | 7/12/2026 |
| 0.1.4-alpha.0.2 | 47 | 7/12/2026 |
| 0.1.4-alpha.0.1 | 49 | 7/12/2026 |
| 0.1.3 | 89 | 7/12/2026 |
| 0.1.3-alpha.0.1 | 50 | 7/10/2026 |
| 0.1.2 | 104 | 7/10/2026 |
| 0.1.2-alpha.0.5 | 49 | 7/10/2026 |
| 0.1.2-alpha.0.4 | 53 | 7/7/2026 |
| 0.1.2-alpha.0.3 | 64 | 6/23/2026 |
| 0.1.2-alpha.0.2 | 60 | 6/23/2026 |
| 0.1.2-alpha.0.1 | 58 | 6/23/2026 |
| 0.1.1 | 101 | 6/23/2026 |
| 0.1.1-alpha.0.5 | 60 | 6/22/2026 |
| 0.1.1-alpha.0.3 | 59 | 6/22/2026 |
| 0.1.1-alpha.0.2 | 58 | 6/21/2026 |
| 0.1.0 | 102 | 6/21/2026 |
| 0.0.5-alpha.0.175 | 56 | 6/21/2026 |
| 0.0.5-alpha.0.171 | 59 | 6/21/2026 |
| 0.0.5-alpha.0.170 | 60 | 6/20/2026 |
| 0.0.5-alpha.0.169 | 56 | 6/20/2026 |