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#. |
|
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
Object Analysis Toolkit is a Data-as-Code analyzer for C# objects. |
GitHub repositories (34)
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 | 2,987,424 | 12/12/2023 |
4.82.0 | 957,389 | 9/12/2023 |
4.81.0 | 124,286 | 9/4/2023 |
4.80.0 | 37,173 | 8/29/2023 |
4.79.0 | 2,480,141 | 1/28/2023 |
4.78.0 | 2,746,907 | 9/1/2022 |
4.77.0 | 2,020,540 | 4/25/2022 |
4.76.0 | 976,373 | 3/1/2022 |
4.75.0 | 568,250 | 1/30/2022 |
4.74.0 | 1,778,002 | 9/24/2021 |
4.73.0 | 2,361,483 | 3/19/2021 |
4.72.0 | 523,613 | 2/9/2021 |
4.71.0 | 181,334 | 1/23/2021 |
4.70.0 | 65,498 | 1/18/2021 |
4.69.0 | 68,279 | 1/9/2021 |
4.68.0 | 2,134 | 1/9/2021 |
4.67.0 | 1,138,432 | 9/12/2020 |
4.66.0 | 2,097,832 | 4/12/2020 |
4.65.0 | 1,282,525 | 12/21/2019 |
4.64.0 | 305,295 | 11/25/2019 |
4.63.0 | 815,497 | 9/16/2019 |
4.62.0 | 432,437 | 7/24/2019 |
4.61.0 | 193,882 | 7/3/2019 |
4.59.0 | 705,993 | 5/12/2019 |
4.58.0 | 673,516 | 2/26/2019 |
4.57.0 | 5,682,304 | 10/11/2018 |
4.56.0 | 203,034 | 9/27/2018 |
4.55.0 | 696,215 | 7/3/2018 |
4.54.0 | 6,904 | 6/30/2018 |
4.53.0 | 325,524 | 5/9/2018 |
4.52.0 | 269,941 | 3/4/2018 |
4.51.0 | 3,292 | 3/3/2018 |
4.4.0 | 14,754 | 2/24/2018 |
4.3.0 | 373,337 | 12/22/2017 |
4.2.0 | 2,511 | 12/22/2017 |
4.1.0 | 21,043 | 12/13/2017 |
4.0.0 | 794,912 | 11/13/2017 |
3.12.0 | 56,620 | 11/11/2017 |
3.10.0 | 13,896 | 11/11/2017 |
3.9.0 | 697,490 | 7/15/2017 |
3.8.0 | 243,739 | 5/12/2017 |
3.6.0 | 471,955 | 12/16/2016 |
3.5.0 | 929,021 | 3/5/2016 |
3.4.0 | 16,021 | 3/1/2016 |
3.3.0 | 286,017 | 10/10/2015 |
3.2.0 | 232,064 | 3/13/2015 |
3.1.0 | 325,898 | 8/25/2014 |
3.0.0 | 82,564 | 5/23/2014 |
2.3.0 | 4,578 | 5/20/2014 |
2.2.0 | 7,183 | 5/8/2014 |
2.1.0 | 9,558 | 4/11/2014 |
2.0.0 | 24,333 | 3/15/2014 |
1.7.4 | 111,125 | 11/7/2013 |
1.7.3 | 15,423 | 10/4/2013 |
1.7.2 | 36,818 | 6/25/2013 |
1.7.1 | 169,141 | 5/3/2013 |
1.7.0 | 2,803 | 5/3/2013 |
1.6.0 | 21,758 | 12/20/2012 |
1.4.2 | 16,065 | 4/27/2012 |
1.3.0 | 49,087 | 4/17/2012 |
Compatibility with .NET Core 8.0