v2.61.0
.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
- feat: Support building csproj targeting net7.0 by @yufeih in #8349
- feat: Support redirect_url by @yufeih in #8340
- feat: Clickable console log by @yufeih in #8341
- feat: Allow custom markdown extensions by @yufeih in #8358
- feat: Display C# API using SymbolDisplay by @yufeih in #8366 #8367 #8374
- feat: display C# special types using familiar format by @yufeih in #8372
π Bug Fixes
π§ 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
- docs: Corrected typo by @Diagonir in #8368
- docs: Update docfx.exe_user_manual.md by @zp-zpanda in #8377
New Contributors
- @lahma made their first contribution in #8361
- @Diagonir made their first contribution in #8368
- @NanoBob made their first contribution in #8370
- @zp-zpanda made their first contribution in #8377
Full Changelog: v2.60.0...v2.61.2