RecursiveAI.OneDiff 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package RecursiveAI.OneDiff --version 1.0.0
                    
NuGet\Install-Package RecursiveAI.OneDiff -Version 1.0.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="RecursiveAI.OneDiff" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RecursiveAI.OneDiff" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RecursiveAI.OneDiff" />
                    
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 RecursiveAI.OneDiff --version 1.0.0
                    
#r "nuget: RecursiveAI.OneDiff, 1.0.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 RecursiveAI.OneDiff@1.0.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=RecursiveAI.OneDiff&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RecursiveAI.OneDiff&version=1.0.0
                    
Install as a Cake Tool

RecursiveAI.OneDiff

Text diff and document comparison for .NET.

The text core: Myers (linear space), patience and histogram diff over any sequence; line, word, character and grapheme tokenizers; semantic and efficiency cleanup; unified and diff-match-patch patches with fuzzy apply; and three-way (diff3) merge with git's conflict styles. No dependency beyond the .NET base class library; net10.0, no native code, NativeAOT and trimming friendly.

using OneDiff;
using OneDiff.Merge;
using OneDiff.Output;

string patch = Diff.Unified(oldText, newText);              // a unified diff
string text  = Diff.ApplyUnified(oldText, patch).Text;     // and back to the new text
TextMerge m  = Diff.Merge(baseText, ours, theirs);         // m.Text, m.HasConflicts, m.Conflicts
TextDiff d   = Diff.Lines(oldText, newText, new DiffSettings { MaxWork = 100_000 });  // d.Lines to read it, d.Diagnostic to see if the cap was hit
SideBySideDiff rows = Diff.SideBySide(oldText, newText);  // aligned rows for two columns

Depends on nothing but the base class library.

More: migrating from DiffPlex, algorithms, patches, merge

Source, issues and the full README: https://github.com/recursive-ai-oss/onediff-csharp. Measured results, including the rows that are pending or lose: https://github.com/recursive-ai-oss/onediff-csharp/blob/main/docs/results.md.

This project is unaffiliated with any other project named OneDiff.

Licensed under MIT OR Apache-2.0. © Recursive AI, LLC.

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 (1)

Showing the top 1 NuGet packages that depend on RecursiveAI.OneDiff:

Package Downloads
RecursiveAI.OneDiff.Documents

Text diff and document comparison for .NET. The document engine: a compare model with source anchors, staged alignment, diff, grouping, classification and verification, a change ledger, and a versioned JSON form, with a completeness check on every comparison.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 0 11/5/2026
1.0.0 0 11/5/2026

See CHANGELOG.md in the repository.