FSharp.Formatting 23.0.0-alpha.5

This is a prerelease version of FSharp.Formatting.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package FSharp.Formatting --version 23.0.0-alpha.5
                    
NuGet\Install-Package FSharp.Formatting -Version 23.0.0-alpha.5
                    
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.5" />
                    
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.5" />
                    
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.5
                    
#r "nuget: FSharp.Formatting, 23.0.0-alpha.5"
                    
#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.5
                    
#: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.5&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FSharp.Formatting&version=23.0.0-alpha.5&prerelease
                    
Install as a Cake Tool

fsdocs and FSharp.Formatting Build and Test NuGet

FSharp.Formatting is a set of libraries and tools for processing F# script files and markdown, and for generating API documentation from XML doc comments. The primary tool is fsdocs.

Full documentation: https://fsprojects.github.io/FSharp.Formatting/

The fsdocs tool

fsdocs builds a static documentation site from the markdown files and F# scripts in your docs folder, plus API reference pages for the projects in your solution.

dotnet tool install fsdocs-tool
dotnet fsdocs build
dotnet fsdocs watch
  • init creates a docs folder with a default index.md.
  • build processes the docs folder and writes the site to output.
  • watch builds the site, serves it locally and rebuilds on every change.
  • convert converts individual markdown and script files.

Run dotnet fsdocs <command> --help to see the options of a command, or read the command line guide.

The libraries

The same functionality is available as NuGet packages for use from your own code:

  • FSharp.Formatting bundles the markdown parser, F# code formatter, literate programming support and API doc generator.
  • FSharp.Formatting.Literate only contains the literate programming support and its dependencies.

See Markdown parser, F# code formatting and literate programming for examples.

Contributing

See CONTRIBUTING.md for how to build the repository and run the tool locally.

Maintainer(s)

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.7 35 9/15/2026
23.0.0-alpha.6 34 9/15/2026
23.0.0-alpha.5 35 9/15/2026
23.0.0-alpha.4 46 9/13/2026
23.0.0-alpha.3 44 9/13/2026
23.0.0-alpha.2 58 9/10/2026
23.0.0-alpha.1 68 9/8/2026
22.2.0 278 8/31/2026
22.1.0 1,332 5/27/2026
22.0.1 574 5/9/2026
22.0.0 1,626 4/4/2026
22.0.0-alpha.3 119 4/2/2026
22.0.0-alpha.2 100 3/13/2026
22.0.0-alpha.1 90 3/5/2026
21.0.0 1,854 11/12/2025
21.0.0-beta-005 948 4/23/2025
21.0.0-beta-004 2,030 11/20/2024
21.0.0-beta-003 1,871 8/16/2024
21.0.0-beta-002 258 6/19/2024
21.0.0-beta-001 268 6/6/2024
Loading failed

### Added

- The API reference pages have an "On this page" menu, like the content pages do. A namespace page lists its types and modules, each linking to its own page; a type or module page lists its sections, which now carry anchors of their own (`Static members`, `Nested modules`, `Inherited members` had none). The index of all namespaces keeps the wide layout, since the page is already that list. The inline "Table of contents" and "Contents" blocks are gone, the menu replaces them. The menu marks the section the reader is in through the same scroll-driven animations as the content pages, over the section headings only: each tracked element costs three generated CSS rules, so a module with hundreds of members stays cheap. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)
- `_menu_template.html` and `_menu-item_template.html` are rendered with the substitutions of the page they go into, `{{root}}` among them, so a menu can link anywhere on the site and not only where fsdocs hands it a link. `{{root}}` is relative to the page being rendered, so `{{root}}reference/index.html` resolves from every depth. A key a menu template defines for itself still wins over a site-wide one of the same name. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)
- `_menu-item_template.html` can use `{{fsdocs-menu-item-title}}`, the hover text of an item. The API reference fills it with the full name of a namespace, where the menu shortened the entry to what tells it apart from its neighbours, and leaves it empty for an item whose text already says where it leads. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)

### Fixed

- The API reference menu on the left lists the namespaces again. Every API page computed that menu and then had it silently replaced: the global substitutions define `fsdocs-list-of-namespaces` as well, with the single "All Namespaces" link meant for the content pages, and the last value for a key wins. The entries drop the prefix that all the namespaces share (`FSharp.Formatting.` here, `Microsoft.FSharp.` for FSharp.Core), which otherwise left a column of identically truncated names, and the full name is the `title` of the entry. The entries of the "On this page" menu carry one too, since that menu is narrow enough to cut them off. The header links to the index of all namespaces. The list of entities that used to expand under the current namespace is gone, the "On this page" menu covers it. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)
- The API reference menu built from `_menu_template.html` and `_menu-item_template.html` marks the namespace of the page the reader is on, and marks its own section as active so a template that folds a section away opens the one the reader is inside. It shortens an entry to the part that tells it apart from its neighbours, with the full name on the `title`. The Markdown output builds the same menu from the same templates and gained all of it too. Note that a templated menu renders its header as a label, where the built-in menu makes the "Namespaces" header the link to the index of all namespaces; see "Customizing menu items by template" for adding that link back. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)
- A menu built from `_menu-item_template.html` no longer escapes the text of a documentation page twice. `Menu.createMenu` encodes the content of an item, and the list of documents encoded it again beforehand, so a title carrying `&`, `<`, `>` or `"` reached the page as the escape sequence itself. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)
- The `j` / `k` hotkeys continue through the tables of the API reference: the namespaces on the index page and the types and modules on a namespace page, which have few headings of their own to stop at. The pages of a module or a type keep to their headings. The generator marks the links that take part with `data-fsdocs-nav`, so a link in your own content can join in as well. A marked link is only scrolled into view when it is off screen, a run of key presses walks the table instead of paging it. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)

### Changed

- `Menu.createMenu` takes the substitutions of the page as its second argument, and `Menu.MenuItem` carries a `Title` field. Both are breaking for code that builds menus through `FSharp.Formatting.Common`. [#1328](https://github.com/fsprojects/FSharp.Formatting/pull/1328)