NeoIni 3.4.0

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

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

NeoIni

Secure, thread-safe INI configuration library for .NET with built-in integrity checking, AES-256 encryption, and a pluggable provider architecture.

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 File watcher with polling and checksum comparison β€” live config updates without restart.
🧩 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)
int level = document.TryGetValue("Game", "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;

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 thinking about implementation details. NeoIni config files are owned and managed by the library; human comments are intentionally not preserved in standard mode (the in-file warning header signals this). For hand-edited configs, use Human-editable mode.

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.0 77 3/31/2026
3.3.0 112 3/28/2026
3.2.2 81 3/26/2026
3.2.1 87 3/23/2026
3.2.0 87 3/23/2026
3.1.0 83 3/21/2026
3.0.0 83 3/21/2026
Loading failed