RDLL.dotnet-fast
0.176.2
dotnet tool install --global RDLL.dotnet-fast --version 0.176.2
dotnet new tool-manifest
dotnet tool install --local RDLL.dotnet-fast --version 0.176.2
#tool dotnet:?package=RDLL.dotnet-fast&version=0.176.2
nuke :add-package RDLL.dotnet-fast --version 0.176.2
dotnet-tools-fast
Fast Rust tooling for .NET workspaces - format, lint, affected-project detection, build caching, and
test sharding without loading MSBuild or Roslyn for the native paths. The native engine does its own filesystem + XML project
discovery and text-preserving transforms, so it starts in milliseconds and beats the official tools by
1–2 orders of magnitude on common workloads (292x on a startup-bound format check, 16–28x on
affected;
measured numbers and methodology).
Every run reports its own cost (and --json emits the metrics).
One command, a few obvious verbs:
| Command | What it does |
|---|---|
dotnet-fast lint |
Verify and report formatting + lint findings (path:line:col: ID message, SARIF) — whitespace, style, analyzer, and 153 native CST rules (DF0001–DF0153) — writing nothing and exiting non-zero on any finding. The CI gate, and what a bare dotnet-fast <path> runs. --baseline fails only on new findings; --summary collapses whitespace noise; --deep adds the project's real Roslyn analyzers. |
dotnet-fast lint --fix |
Apply all safe fixes in one pass: whitespace + style + analyzer + lint (CST). Scope to changed files with --affected (this branch vs the default branch), --from/--to, or --ci. |
dotnet-fast affected |
DotNetAffected-style detection of which projects a Git change impacts, via reverse-dependency walk. |
dotnet-fast build |
Preview remote build cache: restore cached bin/ + obj/ outputs on clean CI agents, build misses, and upload trusted-branch artifacts. |
dotnet-fast test-plan |
Source-discovered NUnit test sharding for CI agents, with matrix/JSON output and runnable dotnet test commands. |
lint is the one umbrella verb: bare = the gate, --fix = apply, --affected/--from/--ci = scope.
format, whitespace, style, and analyzers remain as hidden dotnet format-compatible aliases;
the dotnet-format-fast binary keeps the dotnet format shape (a bare invocation applies fixes).
Install
dotnet-fast is a single native binary — no .NET runtime is needed to run it (the one exception is
lint --deep, which shells to the SDK's real Roslyn analyzers).
dotnet tool install -g RDLL.dotnet-fast # .NET global tool
cargo build --release # from source → target/release/dotnet-fast
Public NuGet.org publishing is pending; until then build from source or use the local-bundle install in the repo.
First run — the bare invocation is the gate, --fix repairs:
dotnet-fast path\to\App.sln # == lint: report findings, exit 1 if any (the CI gate)
dotnet-fast lint --fix path\to\App.sln # apply every safe fix in one pass
dotnet-fast hooks install # wire a pre-commit hook (lint --fix --staged)
Output modes — AI-agent output is the default in agent shells
dotnet-fast adapts its output to who is reading it, and AI agents are a first-class default.
When it detects an AI/agent shell — Claude Code, Cursor, or anything that sets AI_AGENT /
DOTNET_FAST_AGENT=1 — it automatically switches to terse, low-token output that ends with the exact
follow-up command. No flag needed. At a human terminal you get the rich, verbose report; piped/CI
output stays plain.
| You are… | What you get | How it is selected |
|---|---|---|
| An AI agent | Terse, low-token; ends with the fix: command |
Auto in a detected agent shell · force with --agent or DOTNET_FAST_AGENT=1 |
| A human at a terminal | Rich: per-finding lines, TTY colors, per-rule tally | Default · force with --human (alias --rich) even inside an agent shell |
| CI | Plain text + machine formats (SARIF / JSON / matrix), exit-code-driven | Plain when piped/non-TTY · opt into SARIF/JSON explicitly |
GitHub Copilot note: the editor extension never shells out to the CLI, and Copilot's coding agent runs in plain GitHub Actions (indistinguishable from normal CI), so it is not auto-detected — set
DOTNET_FAST_AGENT=1in that workflow to opt in. Thedotnet-format-fastcompat binary never auto-switches (it keeps thedotnet formatshape).
🤖 AI agent — low-token (the default for agents)
$ dotnet-fast lint App.sln # inside an agent shell: terse by default, no flag
10 fixable, 1 manual · 1 file
fix: dotnet-fast lint --fix App.sln
manual:
src/C.cs:5:25 DF0001 Empty catch block swallows exceptions.
Auto-fixable findings collapse to one fix: command; only the manual findings lint --fix can't
resolve are listed — so an agent spends tokens deciding, not reading. lint --fix --agent closes the
loop in one run (apply everything fixable, then enumerate the leftovers). On a findings-heavy lint this
is ~97% fewer output characters. Force it anywhere with --agent; opt out with --human.
Agent-mode reference.
🏗️ CI — exit-code- and machine-format-driven
# One quality gate for PR and main builds (auto-detects GH Actions / Azure / GitLab / Jenkins):
dotnet-fast lint --ci --sarif results.sarif
dotnet-fast lint --ci --baseline gate.json # on-ramp a backlog: fail only on NEW findings
# Build/test only what a change impacts:
dotnet-fast affected --ci --format matrix # GitHub Actions job-matrix JSON
dotnet-fast affected --ci --tests-only --format matrix # ...just the affected test projects
# Restore/build through the remote build cache when configured:
dotnet-fast build --plan --check . # 0 all cached, 3 incomplete, 4 unavailable
dotnet-fast build --projects-file affected.proj . # cache-backed affected-only build
dotnet-fast build --json . # restored/built/bytes report
dotnet-fast build --report artifacts . # writes artifacts\build-report.json
dotnet-fast build --read-only . # PR-safe: read hits, never upload misses
# Split a large NUnit suite across agents:
dotnet-fast test-plan --ci --auto-shards --min-per-shard 50 --max-shards 8 --format matrix .
dotnet-fast test-plan --projects-file affected-tests.dotnet-test.txt --auto-shards --format ado-matrix .
dotnet-fast test-plan --cache-misses-file build-cache-plan.json --auto-shards --format ado-matrix .
dotnet-fast test-plan --shard 3 --of 8 --exec --test-args "--no-build --no-restore -c Release" --results-dir $env:TEMP\trx
# Workspace health gate (exit non-zero to fail the build):
dotnet-fast doctor --strict # workspace smells (CPM / version / lock issues)
Output is plain when piped (no colors/spinners), every gate is exit-code-driven (below), and
--sarif / --json / --format matrix feed code-scanning and matrix fan-out. --ci reads the build
environment and compares PRs against the merge base with their target branch and push builds against
the previous commit, handling shallow clones automatically. Copy-paste pipelines:
CI integration guide.
Exit codes: 0 clean · 1 findings present (lint / bare dotnet-fast) · 2 dotnet format-compat
verify/apply failure · 166 affected ran fine but nothing is affected (skip downstream, not an
error). CI should test != 0.
🔍 Local / debug — rich and verbose
dotnet-fast lint App.sln --human # force the rich report even inside an agent shell
dotnet-fast lint App.sln -v detailed # more detail (set DOTNET_FAST_TIMING=1 for phase timing)
dotnet-fast lint App.sln --summary # collapse whitespace noise to one line, keep the decisions
dotnet-fast lint App.sln --deep # also run the project's real Roslyn analyzers, incl. SDK CA* (needs the SDK + a restored project; opt-in, not the default — see docs/usage.md#deep-real-roslyn-analyzers)
dotnet-fast lint --fix App.sln --staged # pre-commit: fix only the files staged in Git, then re-stage
Rich output is terminal-aware: findings colorize on a TTY (--color auto|always|never, honoring
NO_COLOR/CLICOLOR_FORCE), paths print relative to the current directory, and the report ends with a
per-rule tally. See the
console output guide.
Scope
This is not a complete dotnet format replacement yet. The verified-safe path is SDK-style C#
workspaces covered by the parity tests — currently a 80-file differential corpus at 100% byte
parity with real dotnet format, and 91 of the SDK's 121 IDExxxx rules supported (25
out-of-scope, 6 deferred). Check the
status and gap snapshot
before treating it as a drop-in replacement.
Contributing
Lint and format rules are declared in-repo (the Cargo [lints] table + rustfmt.toml) and follow the
standard Rust style with safe-programming hardening: unsafe_code is denied crate-wide (the one audited
Win32 FFI site carries a scoped #[allow] + SAFETY note), the full recommended clippy set runs, and
dbg!/todo!/unimplemented! are hard errors. They are enforced by the .githooks/pre-push hook
(cargo fmt -- --check + cargo clippy --all-targets -- -D warnings + cargo test) — there is no
push-triggered CI, so the hook is the gate. Enable it once per clone:
pwsh ./tasks.ps1 install-hooks # sets core.hooksPath = .githooks
pwsh ./tasks.ps1 doctor # verify it's wired up (non-zero + fix if not)
Agent and contributor guidance (build/test commands, module map, conventions) lives in AGENTS.md.
Support
dotnet-fast is free to use (see LICENSE). If it speeds up your builds and CI, you can
buy me a coffee ☕ — much appreciated.
Documentation
- Detailed usage and compatibility — every command, option, and coverage table (also shipped inside this package as
docs/usage.md) - CI integration
- Build cache guide
- Test sharding guide
- Status, parity, and gaps
- Development, full performance tables, and releasing
| Product | Versions 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. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.176.2 | 0 | 6/19/2026 |
| 0.176.0 | 67 | 6/18/2026 |
| 0.174.0 | 79 | 6/18/2026 |
| 0.173.0 | 70 | 6/18/2026 |
| 0.172.1 | 78 | 6/18/2026 |
| 0.172.0 | 77 | 6/18/2026 |
| 0.166.0 | 262 | 6/16/2026 |
| 0.165.0 | 227 | 6/16/2026 |
| 0.164.0 | 336 | 6/16/2026 |
| 0.162.0 | 214 | 6/15/2026 |
| 0.160.0 | 128 | 6/15/2026 |
| 0.158.0 | 116 | 6/15/2026 |
| 0.157.0 | 95 | 6/15/2026 |
| 0.154.0 | 94 | 6/14/2026 |
| 0.145.0 | 102 | 6/14/2026 |
| 0.118.0 | 93 | 6/13/2026 |
| 0.117.0 | 96 | 6/13/2026 |
| 0.58.0 | 109 | 6/11/2026 |
| 0.51.0 | 98 | 6/11/2026 |
| 0.16.0 | 90 | 6/11/2026 |