Introduction

edit

Meziantou.Framework.DiffEngine finds the diff and merge tools installed on the machine, such as Visual Studio Code, Rider, Beyond Compare, WinMerge or Meld, and builds the command line that opens two files side by side in them. It does not compare files itself: it tells you which executable to start, and with which arguments.

The snapshot testing libraries use it to open a merge tool when a snapshot changes. See Merge tools for file snapshots and Merge tools for inline snapshots: you do not need this package directly to use them.

What you can do with it

  • Find a tool by name and get the arguments for two files. See Getting started.
  • Find a tool for a file type: one that supports the extension, or else one that supports text. See Getting started.
  • Control the detection with environment variables: point to an executable, or swap the sides of the diff. See Finding tools.

Namespace

DiffTools, DiffTool and ResolvedTool are in the Meziantou.Framework.DiffEngine namespace.

Next steps