FSharp.Formatting 23.0.0-alpha.1

This is a prerelease version of FSharp.Formatting.
dotnet add package FSharp.Formatting --version 23.0.0-alpha.1
                    
NuGet\Install-Package FSharp.Formatting -Version 23.0.0-alpha.1
                    
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="FSharp.Formatting" Version="23.0.0-alpha.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FSharp.Formatting" Version="23.0.0-alpha.1" />
                    
Directory.Packages.props
<PackageReference Include="FSharp.Formatting" />
                    
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 FSharp.Formatting --version 23.0.0-alpha.1
                    
#r "nuget: FSharp.Formatting, 23.0.0-alpha.1"
                    
#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 FSharp.Formatting@23.0.0-alpha.1
                    
#: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=FSharp.Formatting&version=23.0.0-alpha.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FSharp.Formatting&version=23.0.0-alpha.1&prerelease
                    
Install as a Cake Tool

The package is a collection of libraries that can be used for literate programming
     with F# (great for building documentation) and for generating library documentation
     from inline code comments. The key components are Markdown parser, tools for formatting
     F# code snippets, including tool tip type information and a tool for generating
     documentation from library metadata.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on FSharp.Formatting:

Package Downloads
FsReveal

FsReveal parses markdown or F# script files and generates reveal.js slides.

Yaaf.AdvancedBuilding

Yaaf.AdvancedBuilding is a loose collection of build scripts. The benefit is that you can automatically update your build by updating this package, when you don't need your own crazy build script. But even than it is possible that you could re-use some scripts within this package.

FsLab.Runner

This package contains a library for turning FsLab experiments written as script files into HTML and LaTeX reports. The easiest way to use the library is to use the 'FsLab Journal' Visual Studio template.

FSharp.Markdown.Pdf

A F# implementation that uses the Markdown parser from FSharp.Formatting and formats the output into PDF using PdfSharp-MigraDoc.

Farango

Farango is a client for ArangoDB written in F#.

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on FSharp.Formatting:

Repository Stars
commandlineparser/commandline
The best C# command line parser that brings standardized *nix getopt style, for .NET. Includes F# support
dotnet/csharpstandard
Working space for ECMA-TC49-TG2, the C# standard committee.
exercism/v3
The work-in-progress project for developing v3 tracks
Version Downloads Last Updated
23.0.0-alpha.1 0 9/8/2026
22.2.0 153 8/31/2026
22.1.0 1,248 5/27/2026
22.0.1 569 5/9/2026
22.0.0 1,507 4/4/2026
22.0.0-alpha.3 116 4/2/2026
22.0.0-alpha.2 95 3/13/2026
22.0.0-alpha.1 88 3/5/2026
21.0.0 1,836 11/12/2025
21.0.0-beta-005 945 4/23/2025
21.0.0-beta-004 2,023 11/20/2024
21.0.0-beta-003 1,817 8/16/2024
21.0.0-beta-002 256 6/19/2024
21.0.0-beta-001 266 6/6/2024
20.0.1 14,966 5/31/2024
20.0.0 1,906 2/14/2024
20.0.0-beta-002 348 2/8/2024
20.0.0-beta-001 267 1/31/2024
20.0.0-alpha-019 254 1/29/2024
20.0.0-alpha-018 293 1/10/2024
Loading failed

### Changed

- Links are relative. The `{{root}}` substitution is now the path from the page to the root of the site (`./`, `../`, ...) instead of the absolute site URL, so the generated site works from any host name or sub path, from the file system, and `fsdocs watch` can be reached through any address the server is bound to (`--host 0.0.0.0`, a Codespaces forward, a reverse proxy). The `--root` option of `watch` is replaced by `--site-root`, which only sets the site URL. The search index holds site-relative URIs that the search script prefixes with the page's root. The absolute URL of the site is available as the new `{{fsdocs-site-root}}` substitution (from `<PackageProjectUrl>` or `--parameters fsdocs-site-root`; a `root` parameter still sets it but warns); the default template uses it for `og:url` and `twitter:site`, and `llms.txt` links stay absolute. Custom templates that use `{{root}}` in metadata that must be absolute should switch to `{{fsdocs-site-root}}`. Notebook, script and LaTeX outputs keep the absolute site URL since they are used outside the site. The dev server serves a folder URL from its index page and redirects `/folder` to `/folder/`, as static web servers do.
- `fsdocs watch` is a lazy dev server: no output folder is written, a page is built the first time it is requested and cached until a file that influences it changes (content hashes, so byte-identical rewrites invalidate nothing), static files are served from their source location, and a failing page returns a `500` while the other pages keep working. The search index is fetched when the search dialog is first opened instead of on page load. New diagnostic pages at `/.fsdocs/doctor` and `/.fsdocs/doctor.json` show the cracked projects, substitutions, templates, navigation titles, routes and cache state. `--output`, `--clean` and `--saveimages` are ignored by `watch`.
- Project cracking evaluates the MSBuild properties of each project with `dotnet msbuild --getProperty` (in parallel, no design-time build) and drops test projects and executables before any expensive work. The compiler references come from a design-time build (`dotnet msbuild -t:...CoreCompile -getItem:FscCommandLineArgs`, one process per project, in parallel) that runs only for the documented projects and only when the API docs are generated; it is cached in `.fsdocs/references`. Ionide.ProjInfo is no longer used for the design-time build, only to read solution files. The `.fsdocs/cache` key now covers the discovered project files, `Directory.Build.props`, `Directory.Build.targets`, `Directory.Packages.props` and `global.json`, so editing those no longer serves stale project settings.
- Properties set by MSBuild targets, such as a `Version` computed from a changelog by `Ionide.KeepAChangelog.Tasks`, are not visible to an evaluation. The substitutions are therefore recomputed from the design-time build when it runs: `build` uses the refined values for the API docs and the content, `watch` serves the evaluated values until the design-time build ran (at startup, in the background) and then rebuilds the affected pages. The doctor shows per project whether the design-time build ran, which substitutions it changed, and has a button to run it again.
- `TypeConstraintDisplayMode` is a struct discriminated union, as the Ionide analyzers suggest. Source compatible, but the compiled representation changes, so a consumer needs to recompile.
- Rewrote the Mermaid documentation recipe as `docs/mermaid.md` (moved from the oddly-named `docs/sidebyside/sidemermaid.md`) to follow the approach used by the fantomas docs: diagrams are written as plain ```mermaid fenced code blocks, which GitHub renders natively, and an `_body.html` script promotes those blocks into `<div class="mermaid">` elements on fsdocs pages. The FSharp.Formatting docs now ship that script (`docs/_body.html`), so the recipe page actually demonstrates working diagrams.
- Bump `Ionide.ProjInfo` from 0.74.2 to 0.75.0 and `NUnit3TestAdapter` from 6.2.0 to 6.3.0. Both are routine, non-breaking updates.
- Replace `sprintf "<pre><code>"` (a format string with no format arguments) with the plain string literal `"<pre><code>"` in `HtmlFormatting.fs`. This is on the hot path invoked once per rendered code/output block, and avoids the unnecessary printf-format parsing overhead for a string with no substitutions.

### Added

- Logging goes through `Microsoft.Extensions.Logging`. The libraries are silent by default; hosts set `FSharp.Formatting.Common.Logging.LoggerFactory` or call `Logging.UseConsole(level)`. The tool has `-v`/`--verbosity quietminimalnormaldetaileddiagnostic` on `build`, `watch`, `convert` and `init`; `normal` prints one line per phase with counts and durations instead of one line per file, warnings and errors go to standard error with a `warning:`/`error:` prefix, and the doctor shows the last log lines.
- `fsdocs watch` builds the API reference in the background at startup and after a project DLL or project file change, so no page request waits for it. Project files and the solution-wide MSBuild files are watched: a change re-cracks the projects, so substitutions such as `<FsDocsLogoSource>` and the compiler references are picked up without a restart.
- `fsdocs watch --host 0.0.0.0` binds the server to all interfaces so the site can be browsed from another machine on the network.
- Support top-level `<seealso cref="..."/>` XML doc tags in API documentation generation. Per the [xmldoc recommended tags](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags#seealso), `<seealso>` is a top-level section (unlike the inline `<see>` tag) and is now rendered as a "See also" list in both HTML and Markdown API doc output, for both members and entities. [#1256](https://github.com/fsprojects/FSharp.Formatting/issues/1256)

### Fixed

- Surface FSI evaluation failures to stderr by default in `FsiEvaluator`. Previously, when a code snippet failed during `--eval`, the error was silently discarded unless the caller subscribed to `EvaluationFailed` or provided an `onError` callback. Now a concise error message (file name + stderr output) is always written to stderr, making failures visible in `fsdocs` output.
- Fix `FrontMatterFile.ParseFromLines` truncating front-matter values that contain a `:` character (e.g. `title: F#: An Introduction` was previously captured as just `F#`). Additional colons in a value are now preserved.

### Removed

- Remove the `--noserver` option of `fsdocs watch`; watching without serving no longer does anything now that no output folder is written.