Skip to content

Getting Started

github-actions[bot] edited this page Nov 30, 2026 · 2 revisions

Getting Started

Option 1: Scaffold a New Project (dotnet new ferrous)

Start a new project pre-wired with Ferrous, <FerrousPedantic>true</FerrousPedantic>, Central Package Management, lockfiles, and NativeAOT readiness:

dotnet new install Ferrous.Templates
dotnet new ferrous -n MyApp
cd MyApp
dotnet run

Option 2: Add to an Existing Project

Install the Ferrous metapackage to pull in all runtime libraries, source generators, Roslyn analyzers, and IDE quick-fixes:

dotnet add package Ferrous

Or pick individual packages a la carte:

dotnet add package Ferrous.Guard
dotnet add package Ferrous.Results
dotnet add package Ferrous.Unions
dotnet add package Ferrous.Testing   # in test projects

To enable the full Clippy-style strict preset in your .csproj or Directory.Build.props:

<PropertyGroup>
  <FerrousPedantic>true</FerrousPedantic>
</PropertyGroup>

Install the CLI Tool (dotnet fe)

dotnet tool install -g Ferrous.Tool
dotnet fe init --strict
dotnet fe audit .
dotnet fe doc ./src --output ./docs-site --open

Target Frameworks

  • Runtime packages target net10.0 and net11.0, are NativeAOT-compatible and trimmable, and carry zero third-party dependencies.
  • All net11.0 targets compile with .NET 11 runtime async (runtime-async=on) and automatically light up C# 15 [Union] and closed (IsClosedTypeAttribute) metadata.
  • Ferrous.Core additionally targets netstandard2.0 so Roslyn generators and analyzers share attribute contracts directly.

Clone this wiki locally