LdifDotNet 0.8.0

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

LdifDotNet

Pure managed LDIF (RFC 2849) reader and writer for .NET. No native dependencies; compatibility with OpenLDAP is verified in CI against a real slapd.

using LdifDotNet;

// Streaming read: content and change records come back as typed objects
foreach (var record in LdifReader.ReadFile("dump.ldif"))
{
    if (record is LdifContentRecord entry)
        Console.WriteLine($"{entry.Dn}: {entry["cn"]?.Values[0]}");
}

// Strict RFC output: automatic base64 for unsafe values, 76-column folding
string ldif = LdifWriter.WriteToString(records);

// ldapsearch-style unwrapped output
string unwrapped = LdifWriter.WriteToString(records, new LdifWriterOptions { WrapColumn = null });

Handles folding, comments, base64 values and DNs, URL value references (never auto-resolved), all changetypes, controls, and OpenLDAP's modify-increment extension (RFC 4525).

Also includes Dn (RFC 4514 parsing/escaping) and AttributeDescription (RFC 4512 §2.5 mechanics: TypeOf("cn;lang-en") is "cn", HasOption("userCertificate;binary", "binary") detects the RFC 4522 transfer option, and IsValid is the writer's own definition of a legal attribute description).

Product Compatible and additional computed target framework versions.
.NET 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.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on LdifDotNet:

Package Downloads
LdifDotNet.Generator

Fake LDAP directory data generator for LdifDotNet, powered by Bogus.

JoshMakeStuff.Aspire.Hosting.OpenLdap

.NET Aspire hosting integration for OpenLDAP with TLS, seeding, health checks, and a bundled LDAP administration UI.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.0 678 8/8/2026
0.7.0 182 8/7/2026
0.6.0 208 8/3/2026
0.5.0 174 7/29/2026
0.3.0 260 7/17/2026
0.2.0 192 7/17/2026
0.1.0 175 7/17/2026