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

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

NUnit.DeepObjectCompare

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

Repository

A generic implementation for the repository pattern in C#.

Microsoft.CST.OAT

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

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.

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/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
Cinchoo/ChoETL
ETL framework for .NET (Parser / Writer for CSV, Flat, Xml, JSON, Key-Value, Parquet, Yaml, Avro formatted files)
Version Downloads Last updated
4.83.0 3,531,798 12/12/2023
4.82.0 987,723 9/12/2023
4.81.0 128,528 9/4/2023
4.80.0 37,944 8/29/2023
4.79.0 2,557,383 1/28/2023
4.78.0 2,801,129 9/1/2022
4.77.0 2,070,806 4/25/2022
4.76.0 990,101 3/1/2022
4.75.0 575,204 1/30/2022
4.74.0 1,802,162 9/24/2021
4.73.0 2,413,591 3/19/2021
4.72.0 531,081 2/9/2021
4.71.0 182,519 1/23/2021
4.70.0 67,374 1/18/2021
4.69.0 69,920 1/9/2021
4.68.0 2,149 1/9/2021
4.67.0 1,149,747 9/12/2020
4.66.0 2,127,260 4/12/2020
4.65.0 1,295,350 12/21/2019
4.64.0 308,633 11/25/2019
4.63.0 828,252 9/16/2019
4.62.0 434,124 7/24/2019
4.61.0 196,302 7/3/2019
4.59.0 707,952 5/12/2019
4.58.0 683,234 2/26/2019
4.57.0 5,859,839 10/11/2018
4.56.0 204,227 9/27/2018
4.55.0 699,805 7/3/2018
4.54.0 6,947 6/30/2018
4.53.0 328,699 5/9/2018
4.52.0 273,800 3/4/2018
4.51.0 3,310 3/3/2018
4.4.0 14,867 2/24/2018
4.3.0 380,364 12/22/2017
4.2.0 2,516 12/22/2017
4.1.0 21,065 12/13/2017
4.0.0 820,289 11/13/2017
3.12.0 59,216 11/11/2017
3.10.0 14,249 11/11/2017
3.9.0 707,736 7/15/2017
3.8.0 244,731 5/12/2017
3.6.0 478,141 12/16/2016
3.5.0 941,251 3/5/2016
3.4.0 16,081 3/1/2016
3.3.0 288,076 10/10/2015
3.2.0 234,050 3/13/2015
3.1.0 330,006 8/25/2014
3.0.0 84,270 5/23/2014
2.3.0 4,642 5/20/2014
2.2.0 7,206 5/8/2014
2.1.0 9,639 4/11/2014
2.0.0 24,756 3/15/2014
1.7.4 111,947 11/7/2013
1.7.3 15,606 10/4/2013
1.7.2 37,067 6/25/2013
1.7.1 173,018 5/3/2013
1.7.0 2,809 5/3/2013
1.6.0 21,959 12/20/2012
1.4.2 16,141 4/27/2012
1.3.0 49,781 4/17/2012

Compatibility with .NET Core 8.0