Repository navigation
v2.1.0
Highlights
Unicode INI files out of the box. Windows creates missing INI files in the system ANSI code page, so text outside it (CJK, emoji, and on many systems Cyrillic) was silently saved as ?. Write, DeleteKey, and DeleteSection now create a missing or empty file as UTF-16 LE with a byte order mark, the only Unicode encoding the Windows profile API supports (it does not support UTF-8). Existing files with content keep their encoding.
Fixed
KeyExistsreturnedfalsefor existing keys when the key names of a section exceeded 32,768 characters. It also disagreed withReadStringin some cases: a padded key (" Key ") was reported as missing althoughReadStringfound it, and a non-ASCII key in a different case was reported as present althoughReadStringdid not find it.KeyExistsnow uses the same lookup asReadString, has no section size limit, and no longer allocates a 64 KB buffer per call.GetAllSections(2)/GetAllDataSection(section, 2)silently returned an empty array for non-empty data. The minimumbufferSizefor list reads is now 3, matchingReadStringenumeration; smaller values throwArgumentOutOfRangeException.- Concurrent first writes to a new file from several threads no longer fail with a sharing violation.
- The package release notes link pointed to a non-existent tag.
Changed
- New or empty files are UTF-16 LE (see above). If a legacy tool needs an ANSI file, create the file yourself before the first write.
InvalidOperationExceptionmessages for list reads now mention the actual buffer size.- The build no longer references
Microsoft.SourceLink.GitHub8.0.0, which pulled in a vulnerableMicrosoft.Build.Tasks.Git(build-time only; Source Link is built into the .NET SDK and still works). The package has no runtime dependencies, as before. - Package validation now compares each build against 2.0.4 to catch accidental public API removals.
Documentation
The README now includes a Limitations section (encoding, 32,767-character values, error codes via Marshal.GetLastPInvokeError(), case sensitivity), plus buffer size ranges and exceptions. It also removes the incorrect advice that consumers must enable AllowUnsafeBlocks.
No public API was added or removed.
Full Changelog: 2.0.4...2.1.0