AkiSim.Nini 2.0.0.1

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

Nini Configuration Library for OpenSim

A powerful and flexible .NET configuration library supporting multiple configuration sources including INI files, XML, Windows Registry, command-line arguments, and environment variables.

Features

  • Multiple Configuration Sources

    • INI files (Standard, Python, Samba, MySQL, Windows styles)
    • XML configuration files
    • .NET App.config/Web.config files
    • Windows Registry (Windows only)
    • Command-line arguments
    • Environment variables
  • Unified API: Access all configuration sources through a single, consistent interface

  • Type-Safe Access: Get configuration values as strings, integers, booleans, floats, doubles, and longs

  • Merge Support: Combine multiple configuration sources

  • Auto-Save: Automatically persist changes back to the configuration source

  • Event-Driven: Subscribe to configuration change events

Installation

dotnet add package Nini.Opensim

Quick Start

Reading an INI File

using Nini.Config;

// Load an INI file
IConfigSource source = new IniConfigSource("myconfig.ini");

// Access a configuration section
IConfig config = source.Configs["Database"];

// Get values with type conversion
string host = config.Get("host");
int port = config.GetInt("port", 3306); // with default value
bool enabled = config.GetBoolean("enabled");

Reading XML Configuration

IConfigSource source = new XmlConfigSource("myconfig.xml");
IConfig config = source.Configs["AppSettings"];
string value = config.Get("key");

Command-Line Arguments

// Parse: myapp.exe -host localhost -port 8080
IConfigSource source = new ArgvConfigSource(args);
source.AddSwitch("Settings", "host", "h");
source.AddSwitch("Settings", "port", "p");

IConfig config = source.Configs["Settings"];
string host = config.Get("host");
int port = config.GetInt("port");

Merging Configuration Sources

// Load default configuration
IConfigSource defaults = new IniConfigSource("defaults.ini");

// Override with user configuration
IConfigSource userConfig = new IniConfigSource("user.ini");
defaults.Merge(userConfig);

// Values from userConfig override defaults
IConfig config = defaults.Configs["Settings"];

Auto-Save

IConfigSource source = new IniConfigSource("config.ini");
source.AutoSave = true;

IConfig config = source.Configs["Settings"];
config.Set("lastRun", DateTime.Now.ToString());
// Automatically saved to config.ini

Configuration File Examples

INI File Format

[Database]
host = localhost
port = 3306
username = admin
enabled = true

[Logging]
level = Info
path = /var/log/app.log

XML Format

<configuration>
  <configSections>
    <section name="Database" type="System.Configuration.NameValueSectionHandler" />
  </configSections>
  <Database>
    <add key="host" value="localhost" />
    <add key="port" value="3306" />
  </Database>
</configuration>

Platform Support

  • .NET 8.0: Fully supported
  • Cross-platform: Works on Windows, Linux, and macOS
  • Windows Registry: Available on Windows only (marked with [SupportedOSPlatform("windows")])

Migration from .NET Framework

Version 2.0.0 introduces breaking changes:

  • Target Framework: Now requires .NET 8.0 (previously .NET Framework 4.6)
  • Modern Collections: Uses Dictionary<T,K> and List<T> instead of legacy Hashtable and ArrayList
  • Updated APIs: Deprecated APIs have been replaced with modern equivalents
  • Platform Guards: Windows-specific features are properly marked

If you're upgrading from version 1.x, your existing code should work with minimal changes. The public API remains largely compatible.

Documentation

For complete documentation and advanced usage examples, visit:

OpenSim Integration

This version is specifically maintained for the OpenSim virtual world simulator. It includes optimizations and updates tailored for OpenSim's configuration needs.

License

MIT License - See LICENSE file for details

Authors

  • Brent R. Matzelle (Original Author)
  • Akira Sonoda (OpenSim Fork Maintainer)

Contributing

Contributions are welcome! Please submit pull requests to the GitHub repository.

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 was computed.  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

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
2.0.0.1 516 2/18/2026
2.0.0 127 2/16/2026

Version 2.0.0.1: Fix KeyNotFoundException in OrderedList indexer when key is not found (Dictionary replaced Hashtable, breaking null-return semantics). Version 2.0.0: Migrated to .NET 8, modernized collections (Dictionary, List), removed legacy .NET Framework dependencies, updated deprecated APIs, added platform guards for Windows-specific features.