CompareNETObjects 4.83.0
dotnet add package CompareNETObjects --version 4.83.0
NuGet\Install-Package CompareNETObjects -Version 4.83.0
<PackageReference Include="CompareNETObjects" Version="4.83.0" />
paket add CompareNETObjects --version 4.83.0
#r "nuget: CompareNETObjects, 4.83.0"
// 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
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 | Versions 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. |
-
.NETFramework 4.0
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.5.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 1.3
- NETStandard.Library (>= 1.6.0)
- System.Reflection.TypeExtensions (>= 4.1.0)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.5.0)
-
.NETStandard 2.1
- Microsoft.CSharp (>= 4.7.0)
-
net6.0
- System.Configuration.Configurationmanager (>= 6.0.0)
-
net7.0
- System.Configuration.Configurationmanager (>= 7.0.0)
-
net8.0
- System.Configuration.Configurationmanager (>= 8.0.0)
- System.Drawing.Common (>= 8.0.0)
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,435,838 | 12/12/2023 |
4.82.0 | 981,937 | 9/12/2023 |
4.81.0 | 127,875 | 9/4/2023 |
4.80.0 | 37,817 | 8/29/2023 |
4.79.0 | 2,544,263 | 1/28/2023 |
4.78.0 | 2,793,145 | 9/1/2022 |
4.77.0 | 2,062,969 | 4/25/2022 |
4.76.0 | 988,133 | 3/1/2022 |
4.75.0 | 573,573 | 1/30/2022 |
4.74.0 | 1,798,409 | 9/24/2021 |
4.73.0 | 2,404,946 | 3/19/2021 |
4.72.0 | 529,783 | 2/9/2021 |
4.71.0 | 182,336 | 1/23/2021 |
4.70.0 | 67,091 | 1/18/2021 |
4.69.0 | 69,644 | 1/9/2021 |
4.68.0 | 2,139 | 1/9/2021 |
4.67.0 | 1,147,917 | 9/12/2020 |
4.66.0 | 2,122,788 | 4/12/2020 |
4.65.0 | 1,293,383 | 12/21/2019 |
4.64.0 | 308,153 | 11/25/2019 |
4.63.0 | 825,863 | 9/16/2019 |
4.62.0 | 433,762 | 7/24/2019 |
4.61.0 | 195,863 | 7/3/2019 |
4.59.0 | 707,602 | 5/12/2019 |
4.58.0 | 681,685 | 2/26/2019 |
4.57.0 | 5,830,628 | 10/11/2018 |
4.56.0 | 204,043 | 9/27/2018 |
4.55.0 | 699,238 | 7/3/2018 |
4.54.0 | 6,945 | 6/30/2018 |
4.53.0 | 328,137 | 5/9/2018 |
4.52.0 | 273,051 | 3/4/2018 |
4.51.0 | 3,302 | 3/3/2018 |
4.4.0 | 14,844 | 2/24/2018 |
4.3.0 | 379,443 | 12/22/2017 |
4.2.0 | 2,516 | 12/22/2017 |
4.1.0 | 21,064 | 12/13/2017 |
4.0.0 | 816,353 | 11/13/2017 |
3.12.0 | 58,757 | 11/11/2017 |
3.10.0 | 14,159 | 11/11/2017 |
3.9.0 | 706,042 | 7/15/2017 |
3.8.0 | 244,581 | 5/12/2017 |
3.6.0 | 477,383 | 12/16/2016 |
3.5.0 | 938,898 | 3/5/2016 |
3.4.0 | 16,079 | 3/1/2016 |
3.3.0 | 287,776 | 10/10/2015 |
3.2.0 | 233,742 | 3/13/2015 |
3.1.0 | 329,209 | 8/25/2014 |
3.0.0 | 83,925 | 5/23/2014 |
2.3.0 | 4,638 | 5/20/2014 |
2.2.0 | 7,201 | 5/8/2014 |
2.1.0 | 9,625 | 4/11/2014 |
2.0.0 | 24,724 | 3/15/2014 |
1.7.4 | 111,824 | 11/7/2013 |
1.7.3 | 15,563 | 10/4/2013 |
1.7.2 | 37,045 | 6/25/2013 |
1.7.1 | 172,192 | 5/3/2013 |
1.7.0 | 2,807 | 5/3/2013 |
1.6.0 | 21,911 | 12/20/2012 |
1.4.2 | 16,128 | 4/27/2012 |
1.3.0 | 49,670 | 4/17/2012 |
Compatibility with .NET Core 8.0