ZeroDoc.Core 0.2.0

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

🌌 ZeroDoc — Static HTML API Reference Generator

Type: CLI Tool Ecosystem Distribution .NET License

Generate a beautiful, self-contained HTML API reference for any .NET library directly from its compiled assembly and XML documentation file. Part of the sovereign ZeroUniverse ecosystem, ZeroDoc operates with zero running servers, zero HTTP hosts, and zero external runtime dependencies.

No running app. No HTTP host. No Swagger. ZeroDoc reads a .dll plus its compiler-generated .xml doc file and produces a single static HTML page you can open directly from disk, commit to a repo, or publish to any static host.

Why ZeroDoc

Swagger/OpenAPI documents HTTP endpoints of a running web app. That does not help when you ship a class library (a NuGet package, an internal SDK, a WinForms/WPF helper). For libraries the usual option is DocFX, which is heavy, slow, and produces a multi-file site that needs a build pipeline.

DocLens targets the gap:

  • Class libraries, not HTTP. Documents public/protected types and members.
  • Static, no runtime. The assembly is inspected with MetadataLoadContext (no code from the target assembly is executed).
  • One file. CSS and JavaScript are inlined; the output has zero external dependencies.
  • Fast. A typical library renders in well under a second.

How it works

assembly.dll  ─┐
               ├─►  ApiExtractor (MetadataLoadContext + reflection)
assembly.xml  ─┘            │
                            ▼
                       ApiDocument (model)
                            │
                            ▼
                       HtmlRenderer  ─►  index.html  (self-contained)
  1. DocIdGenerator builds ECMA-334 XML documentation comment IDs from reflection (e.g. M:MyLib.Repository1.Add(0)), so they match exactly what the compiler wrote into the .xml file.
  2. XmlDocParser parses the .xml file, flattening inline tags (<see>, <paramref>, <c>) and de-indenting <code> blocks.
  3. ApiExtractor walks the assembly, classifies types, builds C#-style signatures, and binds each member to its documentation.
  4. HtmlRenderer emits a single HTML file with inlined assets.

Install

As a .NET tool:

dotnet tool install -g DocLens.Tool

Or reference the library directly:

dotnet add package DocLens.Core

Usage (CLI)

doclens <assembly> [options]
Option Description
-o, --output <file> Output HTML path (default: <assembly>.html).
-x, --xml <file> XML doc file (default: <assembly>.xml next to the dll).
-t, --title <text> Page title (default: <AssemblyName> API).
-r, --readme <file> Markdown/text shown on the overview page.
--public-only Exclude protected members.
-h, --help Show help.

Example:

doclens bin/Release/netstandard2.0/MyLib.dll -o docs/index.html -t "MyLib" -r README.md

Make sure XML documentation is enabled in your library so the .xml file exists next to the .dll:

<PropertyGroup>
  <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>

Usage (library)

using DocLens.Core.Reflection;
using DocLens.Core.Rendering;

var extractor = new ApiExtractor(new ExtractionOptions
{
    Title = "MyLib",
    Description = File.ReadAllText("README.md"),
    IncludeProtected = true,
});

ApiDocument model = extractor.Extract("bin/Release/netstandard2.0/MyLib.dll");
new HtmlRenderer().RenderToFile(model, "docs/index.html");

Output features

The generated page is designed for both readers and developers:

  • Light/dark theme with system-preference detection and persistence.
  • Instant client-side search over type names, summaries, and member names (press /), so searching a method surfaces the type that declares it.
  • Cross-links: type names in signatures and code link to their own pages.
  • Markdown overview: the --readme file is rendered as Markdown (headings, lists, tables, code fences, links, emphasis).
  • Keyboard and screen-reader friendly: skip link, ARIA labels, visible focus outlines, semantic landmarks (<nav>, <main>).
  • Responsive: collapsible sidebar on small screens.
  • Copy buttons on example code blocks.
  • Grouped members (constructors, properties, methods, events, fields) with signatures, parameters, returns, exceptions, remarks, and examples.

Dependency resolution

DocLens automatically discovers the installed shared frameworks (Microsoft.NETCore.App, Microsoft.WindowsDesktop.App, etc.), so it can document assemblies that depend on WinForms/WPF or ASP.NET. For third-party dependencies in non-standard locations, add directories via ExtractionOptions.AdditionalSearchDirectories.

Supported API surface

Classes, structs, interfaces, enums, delegates; constructors, methods (including generic methods and operators), properties, indexers, events, fields, and constants; nested types; generic type parameters; ref/out/in/params modifiers; nullable and array types; C# keyword aliases (int, string, …).

Project layout

ZeroDoc/
├── src/
│   ├── DocLens.Core/        netstandard2.0 library (extractor + renderer)
│   │   ├── Model/           ApiDocument, ApiType, ApiMember, XmlDocEntry
│   │   ├── Reflection/      DocIdGenerator, ApiExtractor, SignatureBuilder, TypeNameFormatter
│   │   ├── Xml/             XmlDocParser
│   │   └── Rendering/       HtmlRenderer + embedded CSS/JS/HTML assets
│   └── DocLens.Tool/        net8.0 dotnet tool (`zerodoc`)
└── tests/
    ├── DocLens.SampleLib/   richly documented fixture library
    └── DocLens.Tests/       unit + dogfood tests

Testing approach

ZeroDoc is validated by dogfooding: the test fixture (DocLens.SampleLib) is compiled with XML docs, and tests assert that every documentation ID the C# compiler emitted can be reproduced by DocIdGenerator from reflection. The extractor and renderer are then run end-to-end over the compiled fixture. This catches real metadata edge cases (operators, generic arity, indexers, MetadataLoadContext limitations) that mocks would miss.

dotnet build
dotnet test

License

Licensed under the MIT License. Part of the sovereign ZeroUniverse industrial computing ecosystem. See LICENSE.

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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 67 9/14/2026