TL;DR: faf-cli 7.4.0 understands .NET projects the way you do — from Project Sdk, props, and PackageReferences, not from the fact that a .csproj exists. Kill line: .csproj alone ≠ type.

npm install -g faf-cli@7.4.0 cd your-project && faf auto && faf score

What it is

The C# Edition is content-aware C# /.NET detection in faf-cli. You run faf auto in a project with a root-level .csproj; it classifies from Microsoft’s own signals, then writes durable project context into project.faf so AI agents know what they’re standing in.

It classifies your project as one of:

  • MCP serverModelContextProtocol, ModelContextProtocol.AspNetCore, .Core
  • BackendMicrosoft.NET.Sdk.Web (ASP.NET Core host), Worker, Blazor WASM, gRPC when Grpc.AspNetCore is present
  • CLI — System.CommandLine, Spectre.Console, McMaster; or bare OutputType=Exe
  • Library — base Microsoft.NET.Sdk, no host signals. Classlibs stay classlibs.
  • MobileUseMaui

Also recorded: project name, TFM, Sdk, and an inspectable found-line (e.g. Acme.Api.csproj + Sdk=Microsoft.NET.Sdk.Web (ASP.NET Core)). Not a black box.

Why it exists

Every .NET project has a .csproj. Not every .NET project is a web host.

Class libraries, console tools, Workers, ASP.NET Core apps, and MCP servers all ship a project file. Filename-only tooling treats them as the same thing — often “some C# service” — and the agent brief invents controllers you don’t have or refactors a package like an API.

Microsoft already encoded the shape: Sdk, then OutputType / Use* props, then packages and FrameworkReference. The C# Edition exists so the first fact agents get is the one you already declared — what the project actually is.

What’s in it for .NET devs

  • Agents that match the repo. ASP.NET Core stays ASP.NET Core. A pure classlib stays a library. Workers don’t get controller scaffolding by default.
  • Zero new config. No tags, no extra manifest. It reads the .csproj you already ship.
  • Sdk-first rules you’d write yourself. MCP over Web when both are present; Web Sdk is an ASP.NET Core host (not “Web API only”); base Sdk alone never means web.
  • Honest fallbacks. Unknown packages fall through to Sdk / OutputType / library — not a fake backend label. Multi-project roots pick the highest-priority classification at the root (full solution graph is later).
Your project looks like…What agents get
Sdk="Microsoft.NET.Sdk.Web"backend + ASP.NET Core
Sdk="Microsoft.NET.Sdk.Worker"backend + Worker
ModelContextProtocol / ModelContextProtocol.AspNetCoremcp
System.CommandLine / Spectre / McMaster (or OutputType=Exe)cli
Base Sdk + FrameworkReference AspNetCore (library)library + ASP.NET Core (web-lib, not host)
Base Sdk, no host signalslibrary — classlib stays classlib
UseMauimobile + MAUI

Try it

npm install -g faf-cli@7.4.0 cd path/to/your/project faf auto faf score

Open project.faf. An Sdk.Web project should show backend + ASP.NET Core. A class library with no host signals should show library.

Same binary also on npm as faf@7.4.0 if you want the short name.

Bounds

  • Does: classify from root-level .csproj (Sdk + props + PackageReference + FrameworkReference), covered by a 14-fixture suite.
  • Does not: know every NuGet path, treat every .csproj as Web API, or fully roll up multi-project solutions yet (priority pick at root only).

If this saves you a wrong agent brief, a star helps the next project find it.

Star faf-cli