ForgeTrust.AppSurface.Web.Tailwind 0.1.0-preview.2

This is a prerelease version of ForgeTrust.AppSurface.Web.Tailwind.
There is a newer version of this package available.
See the version list below for details.
dotnet add package ForgeTrust.AppSurface.Web.Tailwind --version 0.1.0-preview.2
                    
NuGet\Install-Package ForgeTrust.AppSurface.Web.Tailwind -Version 0.1.0-preview.2
                    
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="ForgeTrust.AppSurface.Web.Tailwind" Version="0.1.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ForgeTrust.AppSurface.Web.Tailwind" Version="0.1.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="ForgeTrust.AppSurface.Web.Tailwind" />
                    
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 ForgeTrust.AppSurface.Web.Tailwind --version 0.1.0-preview.2
                    
#r "nuget: ForgeTrust.AppSurface.Web.Tailwind, 0.1.0-preview.2"
                    
#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 ForgeTrust.AppSurface.Web.Tailwind@0.1.0-preview.2
                    
#: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=ForgeTrust.AppSurface.Web.Tailwind&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=ForgeTrust.AppSurface.Web.Tailwind&version=0.1.0-preview.2&prerelease
                    
Install as a Cake Tool

ForgeTrust.AppSurface.Web.Tailwind

Tailwind CSS integration for AppSurface web applications with zero Node.js dependency.

Overview

This package wires the Tailwind standalone CLI into the AppSurface web build pipeline so your app can compile generated CSS during builds and run Tailwind in watch mode during development.

Features

  • No Node.js required: Uses the official standalone Tailwind CLI binaries.
  • RID-aware runtime packages: Pulls in the platform-specific runtime package automatically when the package is restored.
  • Build integration: Compiles wwwroot/css/app.css to wwwroot/css/site.gen.css by default.
  • Development watch mode: Starts Tailwind in --watch during development when you register the service.

Usage

Install the package and register Tailwind in your web module:

services.AddTailwind(options =>
{
    options.InputPath = "wwwroot/css/app.css";
    options.OutputPath = "wwwroot/css/site.gen.css";
});

Reference the generated stylesheet from your layout:

<link rel="stylesheet" href="~/css/site.gen.css" asp-append-version="true" />

When OutputPath stays under wwwroot/, the generated file is registered as an ASP.NET Core static web asset on clean builds and publish runs. That means Razor Class Libraries and other package-style consumers can serve the generated CSS without checking site.gen.css into source control first. That registration also stays in place for projects that disable the SDK's default content items and rely on the package to declare the generated web-root asset explicitly.

Keep InputPath and OutputPath pointed at different files. The build target and the development watch service both reject configurations where the two paths resolve to the same file, even if one path uses a normalized relative form such as ./wwwroot/css/../css/app.css.

During development, the watch service is non-blocking. If the Tailwind CLI is not available on the current machine, the app still starts and serves any existing CSS while logging a warning that points developers to the runtime package or TailwindCliPath override. Other startup failures still log as errors.

CI

ForgeTrust.AppSurface.Web.Tailwind hooks into the normal dotnet build and dotnet publish pipeline through MSBuild targets, so the default integration does not require a separate npm install or npm run build step in CI.

If you need to suppress the package-driven build temporarily, set TailwindEnabled=false in MSBuild, for example with dotnet build -p:TailwindEnabled=false or a project-level <TailwindEnabled>false</TailwindEnabled> property.

If you want to keep the package-driven build but point it at a different standalone Tailwind executable, set TailwindCliPath to an absolute path or a project-relative file path:

<PropertyGroup>
  <TailwindCliPath>tools/tailwindcss/tailwindcss</TailwindCliPath>
</PropertyGroup>

On Windows, TailwindCliPath can point at the standalone binary directly or at the npm-generated .cmd or .ps1 shim. The package wraps those shims consistently in both build mode and development watch mode, so the same override works in each flow.

Escape hatch (plugin-heavy Tailwind setups)

If your Tailwind configuration depends on npm-only plugins or custom JavaScript tooling, keep your existing Node-based asset pipeline instead of forcing the standalone CLI path.

Disable the package-driven MSBuild integration with TailwindEnabled=false, and either omit services.AddTailwind() or set options.Enabled = false so the development watch service does not start. After that, run your existing npm, pnpm, or yarn Tailwind command as part of your normal frontend build.

If your custom setup still uses the standalone CLI but stores it outside the package runtime layout, prefer TailwindCliPath over editing the imported .targets file directly.

Notes

  • The generated CSS file is intended to be build output and is commonly ignored in source control.
  • Generated CSS outside wwwroot/ still builds locally, but it is not exposed automatically through the static web asset pipeline.
  • The platform-specific ForgeTrust.AppSurface.Web.Tailwind.Runtime.* packages are support packages consumed transitively by this package and are not usually installed directly.
  • Tailwind CLI selection follows the current build host, not RuntimeIdentifier, because the standalone CLI runs during the build. Cross-targeted builds still execute the host-compatible binary.
  • Windows Arm64 hosts intentionally use the win-x64 runtime under emulation. There is no ForgeTrust.AppSurface.Web.Tailwind.Runtime.win-arm64 package because Tailwind v4.1.18 does not ship a native Windows Arm64 standalone CLI.
Product Compatible and additional computed target framework versions.
.NET 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 ForgeTrust.AppSurface.Web.Tailwind:

Package Downloads
ForgeTrust.AppSurface.Docs

ForgeTrust.AppSurface.Docs package for AppSurface application composition.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0-preview.11 41 9/30/2026
0.2.0-preview.8 2,133 8/23/2026
0.2.0-preview.7 279 8/16/2026
0.2.0-preview.6 200 8/12/2026
0.2.0-preview.5 231 8/1/2026
0.2.0-preview.4 216 7/18/2026
0.2.0-preview.2 560 7/3/2026
0.2.0-preview.1 572 6/28/2026
0.1.0 2,232 7/2/2026
0.1.0-rc.4 725 6/16/2026
0.1.0-rc.3 413 6/8/2026
0.1.0-rc.2 478 6/3/2026
0.1.0-rc.1 287 5/31/2026
0.1.0-preview.4 394 5/25/2026
0.1.0-preview.3 83 5/20/2026
0.1.0-preview.2 72 5/14/2026