NeoIni 3.4.3

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

πŸ“– Documentation & Wiki β€” detailed guides, API reference, and examples

NeoIni

Secure, thread-safe configuration framework for .NET with INI-based persistence β€” includes AES-256 encryption, SHA-256 integrity checks, hot reload, pluggable providers, and atomic backups.

⚠️ Not a classic INI parser – NeoIni is a configuration management system that uses an extended INI format as its storage layer. Files written in standard mode contain binary headers, checksums, and encryption metadata, making them unsuitable for direct manual editing (use Human Mode for hand-edited configs).

dotnet add package NeoIni

Features

Feature Details
πŸ”’ AES-256 encryption Transparent file-level encryption (CBC, IV + per-file salt). Key derived from user environment or a custom password.
πŸ›‘οΈ SHA-256 checksum Integrity validation on every load/save. On mismatch β€” ChecksumMismatch event + automatic .backup fallback.
πŸ” Thread-safe AsyncReaderWriterLock protects all read/write operations under concurrent access with full async/await support.
πŸ“¦ Typed Get/Set Read and write bool, int, double, DateTime, enum, string and more with automatic parsing and defaults.
⚑ AutoSave & AutoBackup Automatic saving after N operations. Atomic writes via .tmp + .backup fallback on errors.
πŸ”„ Hot-reload Polling-based hot‑reload with checksum comparison.
🧩 Pluggable providers INeoIniProvider interface β€” store configs in a database, remote service, memory, or any custom backend.
πŸ—ΊοΈ Object mapping Source-generated Get<T>() / Set<T>() for POCO classes via NeoIniKeyAttribute.
✏️ Human-editable mode Preserve comments and formatting for hand-edited INI files (no checksum, no encryption).
πŸ“‘ Full async API Async versions for all major operations β€” CreateAsync, GetValueAsync, SaveFileAsync, etc.
πŸ” Search & TryGet Case-insensitive search across keys/values. TryGetValue<T> reads without modifying the file.
πŸ“’ Rich event system 14 events: save, load, key/section CRUD, autosave, checksum mismatch, errors, search completion.
πŸ”‘ Easy migration Transfer encrypted configs between machines via GetEncryptionPassword().
πŸ“¦ Black-box design Single entrypoint β€” NeoIniDocument owns and manages everything behind a clean public API.

Quick Start

Creating an instance

using NeoIni;

// Plain
NeoIniDocument document = new("config.ini");

// Auto-encryption (machine-bound)
NeoIniDocument encrypted = new("config.ini", EncryptionType.Auto);

// Custom password (portable between machines)
NeoIniDocument portable = new("config.ini", "MySecretPass123");

// Async
NeoIniDocument document = await NeoIniDocument.CreateAsync("config.ini", cancellationToken: ct);

Reading & writing values

// Write
document.SetValue("Database", "Host", "localhost");
document.SetValue("Database", "Port", 5432);

// Read with typed defaults
string host = document.GetValue("Database", "Host", "127.0.0.1");
int    port = document.GetValue("Database", "Port", 3306);

// Read without side effects (no AutoAdd, no file modification)
if (document.TryGetValue("Game", "Level", out int level))
{
    /* use level */
}
else level = 1;
// Async
await document.SetValueAsync("Database", "Host", "localhost");
string host = await document.GetValueAsync("Database", "Host", "127.0.0.1", ct);
  • Missing sections/keys return defaultValue; with UseAutoAdd enabled the key is created automatically.
  • Supports enum, DateTime, and any IConvertible type via invariant-culture parsing.

Section & key management

document.AddSection("Cache");
document.RemoveKey("Cache", "OldKey");
document.RenameSection("Cache", "AppCache");

string[] sections = document.GetAllSections();
string[] keys     = document.GetAllKeys("AppCache");
bool exists       = document.SectionExists("AppCache");
var results = document.Search("token");
foreach (var r in results)
    Console.WriteLine($"[{r.Section}] {r.Key} = {r.Value}");

File operations

document.SaveFile();
document.Reload();
document.DeleteFile();
document.DeleteFileWithData();

Options & presets

document.UseAutoSave = true;
document.AutoSaveInterval = 3;    // save every 3 writes
document.UseAutoBackup = true;
document.UseAutoAdd = true;
document.UseChecksum = true;
document.SaveOnDispose = true;
document.AllowEmptyValues = true;
document.UseShielding = true;

Or use built-in presets: NeoIniOptions.Default, Safe, Performance, ReadOnly, BufferedAutoSave(n).

Events

document.Saved            += (_, _) => Console.WriteLine("Saved");
document.Loaded           += (_, _) => Console.WriteLine("Loaded");
document.KeyChanged       += (_, e) => Console.WriteLine($"[{e.Section}] {e.Key} β†’ {e.Value}");
document.KeyAdded         += (_, e) => Console.WriteLine($"[{e.Section}] +{e.Key}");
document.ChecksumMismatch += (_, _) => Console.WriteLine("Checksum mismatch!");
document.Error            += (_, e) => Console.WriteLine($"Error: {e.Exception.Message}");

Encryption & migration

// Auto-encryption β€” key is derived from user/machine/domain + per-file salt
NeoIniDocument document = new("secure.ini", EncryptionType.Auto);

// Retrieve password to migrate to another machine
string password = document.GetEncryptionPassword();

// On the new machine
NeoIniDocument migrated = new("secure.ini", password);

Disposal

using NeoIniDocument document = new("config.ini");
// SaveFile() is called automatically if SaveOnDispose is true
// After disposal β€” ObjectDisposedException on any access

Advanced Features


API Reference

Full method, options, and event reference β€” API.md


Commercial License

NeoIni is released under the GPLv3 license. If this license does not meet your requirements (e.g., for proprietary or commercial software), a commercial license is available.

The commercial license grants you the right to use NeoIni in proprietary applications without the need to disclose your source code. It also includes priority support and access to private updates.

Pricing:

License Type Price Includes
Individual $49 For a single developer, one product.
Team $199 For up to 5 developers, up to 3 products.
Enterprise $499 Unlimited developers and products, one year of priority support and updates.

All licenses are perpetual (one-time payment). Annual support and update subscriptions are available for 20% of the license price.

To purchase or inquire about custom licensing, please contact the developer directly:

  • Telegram: @an1onime
  • Email: neoinilicense@gmail.com

Prices are in USD and subject to change.


Philosophy

Black Box Design β€” all internal logic is hidden behind the simple public API of NeoIniDocument. You work only with methods and events, without worrying about implementation details.

Standard Mode vs Human Mode – In standard mode, NeoIni owns the configuration file completely: it adds a binary header, checksums, and optional encryption. This guarantees integrity but makes the file unsuitable for manual editing (a warning header is inserted). For human‑edited INI files, use the Human Mode (experimental) which disables checksums and encryption, preserving comments and formatting.

Thus, NeoIni is not a replacement for lightweight INI parsers – it is a robust configuration subsystem that happens to serialize to a text format that resembles INI.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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 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 is compatible.  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. 
.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
3.4.3 119 5/30/2026
3.4.2 110 5/17/2026
3.4.1 107 5/13/2026
3.4.0 143 3/31/2026
3.3.0 146 3/28/2026
3.2.2 112 3/26/2026
3.2.1 117 3/23/2026
3.2.0 119 3/23/2026
3.1.0 108 3/21/2026
3.0.0 109 3/21/2026
Loading failed