Skip to content

v2.61.0

Compare
Choose a tag to compare
@yufeih yufeih released this 30 Jan 05:37
· 1252 commits to main since this release

.NET 7.0 and C# 8, 9, 10, 11

This release adds support for .NET 7 and C# 8, 9, 10, 11. Docfx can now generate API docs for .NET 7 projects supporting all the latest C# language features including:

  • Nullable reference types
  • Default interface members
  • Init-only setters
  • Record types
  • Record struct
  • Checked user defined operators
  • Static abstract interface members
  • Required modifier

Display of API names and signatures have been updated to be more idiomatic C#, including but not limited to:

  • Short familiar type names such as string, int
  • ? for nullable structs and () for tuples

Markdown engine and custom markdown extensions

Markdig has been changed to be the default and recommended markdown engine in docfx. At the same time we are deprecating dfm and other markdown engines supported by docfx. Dfm markdown engine would be removed in some future releases.

To use a custom markdown extension in markdig, a ConfigureMarkdig build option is added to customize the markdig markdown pipeline:

var options = new BuildOptions
{
    // Enable custom markdown extensions here
    ConfigureMarkdig = pipeline => pipeline.UseCitations(),
}

await Docset.Build("docfx.json", options);

Client-side redirection

The new redirect_url metadata redirects a page to a new URL. To setup redirection for a markdown article, remove all markdown content and replace it with:

---
redirect_url: <URL to redirect to>
---

Known Issues

  • Default nullable enum values displayed as numbers instead of enums dotnet/roslyn#66514
  • Nullable reference type in the parameters table missing ?.

What's Changed

πŸ’₯ Breaking Changes

  • BREAKING CHANGE: Set markdig as default and deprecate dfm. by @yufeih in #8342
  • BREAKING CHANGE: Drop modifiers from .NET API YAML output by @yufeih in #8364
  • BREAKING CHANGE: Drop builtin fsproj support by @yufeih in #8375

πŸŽ‰ New Features

🐞 Bug Fixes

  • fix: Set summary and conceptual to empty string instead of null by @NanoBob in #8370

πŸ”§ Engineering

  • build: Upgrade to Jint 3.0.0-beta-2046 by @lahma in #8361
  • build: Upgrade to YamlDotNet version 12.3.1 by @lahma in #8373

πŸ“„ Documentation

New Contributors

Full Changelog: v2.60.0...v2.61.2