Migration Notes

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Comparison MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-comparison -- dnx GroupDocs.Comparison.Mcp --yes
Folders, licensing and more →

Why To Migrate?

Here are the key reasons to use the new updated API provided by GroupDocs.Comparison for .NET since version 19.9:

  • The Comparer class introduced as a single entry point to compare documents of any supported file format with various options and ability to accept/reject differences in output document.
  • Document compare options for all document types. Instead of using document related options now options are related to compare type only.
  • The overall document related classes were unified to common.
  • Product architecture was redesigned from scratch in order to simplify passing options and classes to manipulate comparison.
  • Document information and preview generation procedures were simplified.

How To Migrate?

Here is a brief comparison of how to compare document with old and new API.

Old coding style

using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
// ...

Comparer comparer = new Comparer();
ComparisonSettings settings = new ComparisonSettings()
{
    StyleChangeDetection = true
};
ICompareResult result = comparer.Compare("source.docx", @"target.docx", settings);
result.SaveDocument("result.docx");

New coding style

using GroupDocs.Comparison;
using GroupDocs.Comparison.Options;
// ...

using (Comparer comparer = new Comparer("source.docx"))
{
    comparer.Add("target.docx");
    CompareOptions compareOptions = new CompareOptions()
    {
        DetectStyleChanges = true
    };
	comparer.Compare("result.docx", compareOptions);
}