Skip to main content
Any Framework

Automatically generate comprehensive documentation for your .NET application configuration settings. Keep your 'appsettings.json' files documented, validated, and always up-to-date with JSON schemas, Markdown, and HTML documentation.

Published
Jan 6, 2026
9mo ago
Total Downloads
1.6K
1,573

Install

dotnet add package TomsToolbox.Settings.Documentation.Analyzer --version 1.0.0-beta2

No framework information available.

README

TomsToolbox.Settings.Documentation.Analyzer

Roslyn analyzer that helps ensure your configuration classes are properly annotated for automatic documentation generation.

Overview

This analyzer provides compile-time diagnostics and code fixes to help you maintain consistent and complete documentation of your application's configuration settings. It works in conjunction with the Settings.Documentation library to ensure all configuration options are discoverable and well-documented.

Diagnostics

CONF001: Missing [SettingsSection] Attribute

Severity: Warning

Warns when a configuration options class used with AddOptions<T>() is missing the [SettingsSection] attribute.

Code Fix: Automatically adds the [SettingsSection] attribute to the class.

CONF002: Missing Description

Severity: Warning

Warns when a property in a configuration options class lacks a [Description] attribute, which is used for documentation generation.

Code Fix: Automatically adds a [Description] attribute placeholder to the property.

CONF003: Missing [SettingsAddOptionsInvocator] Attribute

Severity: Warning

Warns when a method that invokes AddOptions<T>() is missing the [SettingsAddOptionsInvocator] attribute, making it non-discoverable for documentation generation.

Code Fix: Automatically adds the [SettingsAddOptionsInvocator] attribute to the method.

Installation

Install via NuGet:

dotnet add package TomsToolbox.Settings.Documentation.Analyzer

The analyzer is automatically integrated into your build process and provides real-time feedback in Visual Studio, VS Code, and other IDEs that support Roslyn analyzers.

Requirements

  • .NET Standard 2.0 or higher
  • Microsoft.CodeAnalysis.CSharp 4.4.0 or higher

Related Packages

  • TomsToolbox.Settings.Documentation.Abstractions - Attribute definitions
  • TomsToolbox.Settings.Documentation.Builder - Runtime library for generating documentation

For more information, see the main repository documentation.

License

MIT License

Part of the TomsToolbox library suite.

Changes from Previous Version

No structural changes between v1.0.0-beta10 and v1.0.0-beta2.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.