Bodu.Text.Ini 1.0.0

dotnet add package Bodu.Text.Ini --version 1.0.0
                    
NuGet\Install-Package Bodu.Text.Ini -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.Ini" 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.Ini" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Bodu.Text.Ini" />
                    
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.Ini --version 1.0.0
                    
#r "nuget: Bodu.Text.Ini, 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.Ini@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.Ini&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Bodu.Text.Ini&version=1.0.0
                    
Install as a Cake Tool

Bodu.Text.Ini

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

An INI library for .NET 8, shaped after System.Text.Json: a typed serializer over a two-reader token surface, with a comment-preserving mutable document object model and a read-only one. The value model is a two-level object-of-objects — global keys hoist onto the root, each [section] is a nested object of string values.

Installation

dotnet add package Bodu.Text.Ini

Targets net8.0. Also available through the Bodu.Text.Formats umbrella package.

API shape

Type(s) Namespace Role
IniSerializer / IniSerializerOptions / IniSerializerDefaults Bodu.Text.Ini Static serializer entry point, configuration (GlobalSectionName, duplicate policies), and presets (Strict = configparser strict mode).
IniDocumentOptions, IniDuplicateSectionBehavior / IniDuplicateKeyBehavior Bodu.Text.Ini The document-model duplicate policies (merge / disallow sections; last-wins / first-wins / disallow keys).
IniFormatException / IniSerializationException Bodu.Text.Ini Failures split by cause: malformed input or policy violations vs. values that cannot be mapped.
Utf8IniReader (+ IniReaderOptions) Bodu.Text.Ini.Reader Forward-only ref struct reader over the file as authored (source order, comments included).
IniDocumentReader Bodu.Text.Ini.Reader Normalized cursor over the logical object-of-objects shape (globals hoisted, duplicate sections merged).
Utf8IniWriter (+ IniWriterOptions) Bodu.Text.Ini.Writer Forward-only ref struct writer (section headers, entries, comment lines).
IniDocument / IniElement / IniProperty Bodu.Text.Ini.Document Read-only, trivia-free document object model.
IniNode / IniObject / IniValue Bodu.Text.Ini.Nodes Mutable, comment-preserving document object model: parse, edit, write back with the human's annotations intact.
using Bodu.Text.Ini.Nodes;

IniObject root = IniNode.Parse(File.ReadAllBytes("app.ini"));
root["server"].AsObject()["port"].AsValue().Value = "9090";
File.WriteAllBytes("app.ini", root.ToUtf8Bytes());   // comments survive

The dialect is deliberately conservative: = only, values literal to end of line (inline ;/# is content), ; and # full-line comments, BOM and mixed line endings handled.

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.Ini:

Package Downloads
Bodu.Text.Formats

Umbrella package for the Bodu line-oriented text formats on .NET 8 — delimited text (RFC 4180 CSV/TSV), DotEnv, and INI. References Bodu.Text.Delimited, Bodu.Text.DotEnv, and Bodu.Text.Ini, each a System.Text.Json-shaped library with a ref-struct Utf8 reader/writer pair, a serializer, a mutable node DOM, and a read-only document DOM.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 48 9/24/2026
0.7.0 86 9/24/2026
0.6.0 67 9/24/2026
0.5.0 71 9/23/2026