CompareNETObjects 4.83.0

dotnet add package CompareNETObjects --version 4.83.0
NuGet\Install-Package CompareNETObjects -Version 4.83.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="CompareNETObjects" Version="4.83.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CompareNETObjects --version 4.83.0
#r "nuget: CompareNETObjects, 4.83.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.
// Install CompareNETObjects as a Cake Addin
#addin nuget:?package=CompareNETObjects&version=4.83.0

// Install CompareNETObjects as a Cake Tool
#tool nuget:?package=CompareNETObjects&version=4.83.0

Project Description

What you have been waiting for. Perform a deep compare of any two .NET objects using reflection. Shows the differences between the two objects.

Compatibility

  • Compatible with .NET Framework 4.0 and higher.
  • .NET Standard 1.3 Build Compatible with .NET Core 1.0, Mono 4.6, Xamarin.iOS 10.0, Xamarin.Mac 3.0, Xamarin.Android 7.0, Universal Windows Platform 10.0
  • .NET Standard 2.0 Build Compatible with .NET Core 2.0, Mono 5.4, Xamarin.iOS 10.14, Xamarin.Mac 3.8, Xamarin.Android 8.0, Universal Windows Platform 10.0.16299, Unity 2018.1
  • .NET Standard 2.1 Build Compatible with .NET 5, .NET 6, .NET 7, .NET 8, Mono 6.4, Xamarin.iOS 12.16, Xamarin.Mac 5.16, Xamarin.Android 10.0

NuGet Package

AppVeyor Status: https://ci.appveyor.com/project/GregFinzer/compare-net-objects

http://www.nuget.org/packages/CompareNETObjects

Installation

Install with NuGet Package Manager Console

Install-Package CompareNETObjects

Install with .NET CLI

dotnet add package CompareNETObjects

Features

Feature Overview

  • Compare Children (on by default)
  • Handling for Trees with Children Pointing To Parents (Circular References)
  • Compares Publicly Visible Class Fields and Properties
  • Compares Private Fields and Properties (off by default)
  • Source code in C#
  • NUnit Test Project Included with over 275+ unit tests
  • Ability to load settings from a config file for use with powershell
  • Ability to pass in the configuration
  • Ability to save and load the configuration as json
  • Test Extensions .ShouldCompare and .ShouldNotCompare
  • Several configuration options for comparing private elements, ignoring specific elements, including specific elements.
  • Property and Field Info reflection caching for increased performance
  • Rich Differences List or simple DifferencesString
  • Difference Callback
  • Supports custom comparison for types and properties
  • ElapsedMilliseconds indicates how long the comparison took
  • Thread Safe
  • Beyond Compare Report
  • WinMerge Report
  • CSV Report
  • User Friendly Report
  • HTML Report

Options

  • Ability to IgnoreCollectionOrder to compare lists of different lengths
  • Ability to ignore indexer comparison
  • Ability to ignore types
  • Ability to ignore specific members by name or by wildcard
  • Interface member filtering
  • Ability to treat string.empty and null as equal
  • Ability to ignore string leading and trailing whitespace
  • Case insensitive option for strings
  • Ignore millisecond differences between DateTime values or DateTimeOffset values
  • Precision for double or decimal values

Supported Types

  • Anonymous Types
  • Arrays (Single, Multi-Dimensional, and Immutable)
  • Classes
  • Collections
  • DataColumn
  • DataRow
  • DataSet
  • DataTable
  • DateOnly (.NET Core 6.0 or highter)
  • DateTime
  • DateTimeOffset
  • Dictionary
  • Dynamic (Expando objects and Dynamic objects are supported)
  • Enum
  • Fields
  • Font (Windows Only)
  • Guid
  • HashSet
  • IDictionary
  • IList
  • IntPtr
  • IPEndPoint (Supported for everything except .NET Standard 1.0)
  • LinearGradient
  • List
  • Primitive Types (String, Int, Boolean, etc.)
  • Properties
  • SByte
  • StringBuilder
  • Struct
  • Timespans
  • HashSet
  • TimeOnly (.NET Core 6.0 or highter)
  • Timespan
  • Types of Type (RuntimeType)
  • URI

Limitations

  • Custom Collections with Non-Integer Indexers cannot be compared.
  • Private properties and fields cannot be compared for .NET Core 1.3. They are allowed to be compared in .NET Core 2.0 and higher.
  • When ignoring the collection order, the collection matching spec must be a property on the class. It cannot be a field or a property on a child or parent class. The property has to be a simple type.
  • COM Objects are not compared. To compare COM objects wrap their properties in a .NET Object or create a <a href="https://github.com/GregFinzer/Compare-Net-Objects/wiki/Custom-Comparers">custom comparer</a>. Also See: https://stackoverflow.com/questions/9735394/reflection-on-com-interop-objects
  • Version 4.62 and earlier used the hash code to identify objects to keep track of parents and children. In later versions the object reference is used. The reason for this change is that developers were overriding the GetHashCode. If you are overriding equals in your project with Compare .NET Objects inside, you will need to set Config.UseHashCodeIdentifier = true or it will cause a stack overflow. See this issue: https://github.com/GregFinzer/Compare-Net-Objects/issues/282. See the proper way to override equals: https://github.com/GregFinzer/Compare-Net-Objects/wiki/Overriding-Equals

Getting Started

https://github.com/GregFinzer/Compare-Net-Objects/wiki/Getting-Started

Help File

https://github.com/GregFinzer/Compare-Net-Objects/blob/master/Compare-NET-Objects-Help/Compare-NET-Objects-Help.chm?raw=true

Licensing

Compare .NET Objects is an open source project with an Ms-PL license with no commercial support. It is free to use and distribute for commercial and non-commercial purposes. Below is a link to the licensing.
https://github.com/GregFinzer/Compare-Net-Objects/wiki/Licensing

If you would like a perpetual MIT license with commercial support for a period of one year for all developers at your organization, purchase this option: https://kellermansoftware.com/products/compare-net-objects

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.3 is compatible.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net40 is compatible.  net403 was computed.  net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (101)

Showing the top 5 NuGet packages that depend on CompareNETObjects:

Package Downloads
Xero.NetStandard.OAuth2

This is a .NETStandard SDK library, used to communicate with the Xero API using OAuth2.0. See https://github.com/XeroAPI/Xero-NetStandard for more information

Repository

A generic implementation for the repository pattern in C#.

NUnit.DeepObjectCompare

Add deep object comparison to your NUnit assertions. Simply use Is.DeepEqualTo in place of Is.EqualTo.

KubeOps

This is an operator sdk written in c#. It enables a developer to create a custom controller for CRDs (CustomResourceDefinitions) that runs on kubernetes.

Microsoft.CST.OAT The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Object Analysis Toolkit is a Data-as-Code analyzer for C# objects.

GitHub repositories (32)

Showing the top 5 popular GitHub repositories that depend on CompareNETObjects:

Repository Stars
microsoft/AttackSurfaceAnalyzer
Attack Surface Analyzer can help you analyze your operating system's security configuration for changes during software installation.
microsoft/playwright-dotnet
.NET version of the Playwright testing and automation library.
microsoft/AdaptiveCards
A new way for developers to exchange card content in a common and consistent way.
SubnauticaNitrox/Nitrox
An open-source, multiplayer modification for the game Subnautica.
Xavalon/XamlStyler
Visual Studio extension to help format your XAML source code
Version Downloads Last updated
4.83.0 365,534 12/12/2023
4.82.0 626,091 9/12/2023
4.81.0 78,588 9/4/2023
4.80.0 26,963 8/29/2023
4.79.0 1,826,421 1/28/2023
4.78.0 2,171,929 9/1/2022
4.77.0 1,642,831 4/25/2022
4.76.0 837,983 3/1/2022
4.75.0 490,578 1/30/2022
4.74.0 1,569,631 9/24/2021
4.73.0 2,066,899 3/19/2021
4.72.0 473,296 2/9/2021
4.71.0 164,666 1/23/2021
4.70.0 54,612 1/18/2021
4.69.0 60,445 1/9/2021
4.68.0 1,779 1/9/2021
4.67.0 1,046,699 9/12/2020
4.66.0 1,866,050 4/12/2020
4.65.0 1,197,966 12/21/2019
4.64.0 276,991 11/25/2019
4.63.0 713,945 9/16/2019
4.62.0 417,293 7/24/2019
4.61.0 172,986 7/3/2019
4.59.0 684,150 5/12/2019
4.58.0 632,732 2/26/2019
4.57.0 4,542,607 10/11/2018
4.56.0 194,676 9/27/2018
4.55.0 672,868 7/3/2018
4.54.0 6,399 6/30/2018
4.53.0 305,491 5/9/2018
4.52.0 241,852 3/4/2018
4.51.0 2,934 3/3/2018
4.4.0 13,767 2/24/2018
4.3.0 340,454 12/22/2017
4.2.0 2,212 12/22/2017
4.1.0 19,800 12/13/2017
4.0.0 634,677 11/13/2017
3.12.0 41,243 11/11/2017
3.10.0 10,684 11/11/2017
3.9.0 640,667 7/15/2017
3.8.0 236,728 5/12/2017
3.6.0 426,269 12/16/2016
3.5.0 840,880 3/5/2016
3.4.0 15,398 3/1/2016
3.3.0 264,295 10/10/2015
3.2.0 219,739 3/13/2015
3.1.0 298,248 8/25/2014
3.0.0 69,847 5/23/2014
2.3.0 3,914 5/20/2014
2.2.0 6,836 5/8/2014
2.1.0 8,961 4/11/2014
2.0.0 21,709 3/15/2014
1.7.4 104,675 11/7/2013
1.7.3 14,554 10/4/2013
1.7.2 35,064 6/25/2013
1.7.1 142,890 5/3/2013
1.7.0 2,465 5/3/2013
1.6.0 20,017 12/20/2012
1.4.2 14,117 4/27/2012
1.3.0 35,290 4/17/2012

Compatibility with .NET Core 8.0