Install
dotnet add package Meziantou.Framework.DiffEngine --version 2.0.13
| Product | Versions |
|---|---|
| .NET |
README
Meziantou.Framework.DiffEngine
Meziantou.Framework.DiffEngine resolves installed diff tools and provides launch arguments for comparing two files.
This package is designed for snapshot testing scenarios and is API-compatible with the subset needed by:
Meziantou.Framework.SnapshotTestingMeziantou.Framework.InlineSnapshotTesting
Supported public API
DiffToolenumDiffTools.TryFindByName(DiffTool, out ResolvedTool?)DiffTools.TryFindByExtension(string, out ResolvedTool?)ResolvedTool(Name,Tool,ExePath,SupportsText,BinaryExtensions,GetArguments)
Example
if (DiffTools.TryFindByName(DiffTool.VisualStudioCode, out var tool))
{
var arguments = tool.GetArguments("received.json", "verified.json");
Assert.Equal("--diff received.json verified.json", arguments);
// Start the tool with Process.Start(tool.ExePath, arguments)
}
Environment variables
DiffEngine_<ToolName>: override executable detection for one tool (file path or directory). When the variable is set but the executable cannot be found,TryFindByNamethrows so the typo is not silently ignored, whileTryFindByExtensionskips that tool and keeps looking at the others.DiffEngine_TargetOnLeft=true: invert generated argument order
Changes from Previous Version
No structural changes between v2.0.12 and v2.0.13.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.