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 (104)
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,848,015 | 12/12/2023 |
4.82.0 | 1,005,872 | 9/12/2023 |
4.81.0 | 131,232 | 9/4/2023 |
4.80.0 | 38,324 | 8/29/2023 |
4.79.0 | 2,599,101 | 1/28/2023 |
4.78.0 | 2,830,096 | 9/1/2022 |
4.77.0 | 2,093,225 | 4/25/2022 |
4.76.0 | 997,850 | 3/1/2022 |
4.75.0 | 579,909 | 1/30/2022 |
4.74.0 | 1,815,245 | 9/24/2021 |
4.73.0 | 2,440,849 | 3/19/2021 |
4.72.0 | 534,879 | 2/9/2021 |
4.71.0 | 183,616 | 1/23/2021 |
4.70.0 | 68,306 | 1/18/2021 |
4.69.0 | 71,647 | 1/9/2021 |
4.68.0 | 2,156 | 1/9/2021 |
4.67.0 | 1,156,545 | 9/12/2020 |
4.66.0 | 2,144,636 | 4/12/2020 |
4.65.0 | 1,301,442 | 12/21/2019 |
4.64.0 | 310,251 | 11/25/2019 |
4.63.0 | 834,872 | 9/16/2019 |
4.62.0 | 435,099 | 7/24/2019 |
4.61.0 | 197,642 | 7/3/2019 |
4.59.0 | 709,212 | 5/12/2019 |
4.58.0 | 687,701 | 2/26/2019 |
4.57.0 | 5,950,942 | 10/11/2018 |
4.56.0 | 205,202 | 9/27/2018 |
4.55.0 | 701,708 | 7/3/2018 |
4.54.0 | 6,973 | 6/30/2018 |
4.53.0 | 330,102 | 5/9/2018 |
4.52.0 | 275,535 | 3/4/2018 |
4.51.0 | 3,323 | 3/3/2018 |
4.4.0 | 14,992 | 2/24/2018 |
4.3.0 | 383,423 | 12/22/2017 |
4.2.0 | 2,528 | 12/22/2017 |
4.1.0 | 21,083 | 12/13/2017 |
4.0.0 | 836,107 | 11/13/2017 |
3.12.0 | 60,593 | 11/11/2017 |
3.10.0 | 14,467 | 11/11/2017 |
3.9.0 | 713,642 | 7/15/2017 |
3.8.0 | 245,283 | 5/12/2017 |
3.6.0 | 481,224 | 12/16/2016 |
3.5.0 | 947,912 | 3/5/2016 |
3.4.0 | 16,206 | 3/1/2016 |
3.3.0 | 289,179 | 10/10/2015 |
3.2.0 | 235,080 | 3/13/2015 |
3.1.0 | 331,437 | 8/25/2014 |
3.0.0 | 85,089 | 5/23/2014 |
2.3.0 | 4,679 | 5/20/2014 |
2.2.0 | 7,232 | 5/8/2014 |
2.1.0 | 9,680 | 4/11/2014 |
2.0.0 | 24,925 | 3/15/2014 |
1.7.4 | 112,416 | 11/7/2013 |
1.7.3 | 15,799 | 10/4/2013 |
1.7.2 | 37,356 | 6/25/2013 |
1.7.1 | 174,698 | 5/3/2013 |
1.7.0 | 2,820 | 5/3/2013 |
1.6.0 | 22,119 | 12/20/2012 |
1.4.2 | 16,153 | 4/27/2012 |
1.3.0 | 50,219 | 4/17/2012 |
Compatibility with .NET Core 8.0