Bodu.Text.Configuration 1.0.0

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

Bodu.Text.Configuration

API stability — Stable. The public API surface is committed; breaking changes are reserved for a major-version bump per SemVer.

An EditorConfig-inspired, INI-backed configuration document model with parse, resolve, and write phases that consumers can compose independently.

The library separates three concerns:

source text ──► ConfigurationDocument.Parse  ──► IniDocument
IniDocument ──► .Resolve(targetPath)         ──► ConfigurationView
ConfigurationView ──► .GetXxx(key)           ──► typed value

Profiles select a coherent set of parse, resolve, and write defaults: Bodu (permissive default), EditorConfigCompatible (strict EditorConfig 0.17.2 alignment), Strict (deterministic parsing for generated files), and Relaxed (collect-diagnostics for user-authored files).

Quick start

using Bodu.Text.Configuration;

ConfigurationDocument document = ConfigurationDocument.Parse("""
    root = true

    [*]
    indent_size = 4
    start_day = Monday

    [src/**.cs]
    indent_size = 8
    """);

// Sections whose glob matches the target path apply, later sections winning.
ConfigurationView view = document.Resolve("src/App/Program.cs");

var indent = view.GetInt32("indent_size");                     // 8
var start = view.GetEnum<DayOfWeek>("start_day");              // Monday
var missing = view.TryGetValue("theme", out string? theme);    // false - no throw

// Presets switch the whole pipeline's dialect in one place:
ConfigurationView compat = document.Resolve(
    "src/App/Program.cs", ConfigurationResolveOptions.EditorConfigCompatible);

ParseWithDiagnostics returns the document plus collected ConfigurationDiagnostic rows instead of throwing; ConfigurationDocument.Save(document, path, writeOptions) round-trips the document (comments preserved by default).

Where to start

  • Documentation index — high-level pipeline overview.
  • Concepts — vocabulary used throughout the API: documents, views, profiles, target paths, preamble, unset values, diagnostics.
  • Getting started — worked samples for parsing, resolving, typed value access, and round-tripping.

Runnable samples

The repository ships offline, dotnet run-able sample projects for this package and its bridge — the resolve cascade, diagnostics, unset dialect handling, save round trips, and the Microsoft.Extensions.Configuration integration — under samples/Text.Configuration/.

When to reach for the bridge package

If you want a .boduconfig file to flow into Microsoft.Extensions.Configuration (the standard IConfiguration / IOptions<T> pipeline) rather than calling the document/resolver model directly, use Bodu.Extensions.Configuration.Text. It bridges the same document model into the IConfigurationBuilder API surface.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bodu.Text.Configuration:

Package Downloads
Bodu.Extensions.Configuration.Text

The EditorConfig-compatible Microsoft.Extensions.Configuration provider. Bridges Bodu.Text.Configuration into the standard IConfiguration / IOptions<T> pipeline so a .boduconfig or bodu.config file registers with the same AddTextConfiguration(...) shape used for the JSON, INI, and XML providers — with file, stream, and programmatic-document overloads, reload-on-change, and colon-delimited section binding. Also ships the read-only TOML (AddTomlFile / AddTomlStream) and Bencode (AddBencodeFile / AddBencodeStream) sources.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 69 9/24/2026
0.7.0 284 9/24/2026
0.6.0 81 9/24/2026
0.5.0 76 9/23/2026