SharpAssert.CompareNETObjects 4.84.0-sharpassert.1

This is a prerelease version of SharpAssert.CompareNETObjects.
dotnet add package SharpAssert.CompareNETObjects --version 4.84.0-sharpassert.1
                    
NuGet\Install-Package SharpAssert.CompareNETObjects -Version 4.84.0-sharpassert.1
                    
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="SharpAssert.CompareNETObjects" Version="4.84.0-sharpassert.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SharpAssert.CompareNETObjects" Version="4.84.0-sharpassert.1" />
                    
Directory.Packages.props
<PackageReference Include="SharpAssert.CompareNETObjects" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SharpAssert.CompareNETObjects --version 4.84.0-sharpassert.1
                    
#r "nuget: SharpAssert.CompareNETObjects, 4.84.0-sharpassert.1"
                    
#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.
#:package SharpAssert.CompareNETObjects@4.84.0-sharpassert.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SharpAssert.CompareNETObjects&version=4.84.0-sharpassert.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=SharpAssert.CompareNETObjects&version=4.84.0-sharpassert.1&prerelease
                    
Install as a Cake Tool

SharpAssert comparison fork

Base: CompareNETObjects 4.84.0, tag v4.84, commit 4ecf3ddcfd252e276b0b9f59e5a57c1dc5ad74b9.

Source: https://github.com/GregFinzer/Compare-Net-Objects

Fork: https://github.com/yevhen/Compare-Net-Objects

Package: SharpAssert.CompareNETObjects version 4.84.0-sharpassert.1. Assembly: SharpAssert.CompareNETObjects. Target: net8.0, for use by SharpAssert on .NET 9 and later.

Changes

  • Do not compile or register FontComparer.
  • Remove TypeHelper.IsFont and its System.Drawing import.
  • Remove the System.Drawing.Common package reference.
  • Use a separate package and assembly name.
  • Keep the other comparison code, namespaces, strong-name key, and license unchanged.

Font values no longer have a special comparer. They can still reach the general class comparer. This fork does not provide font or image support.

Local package

Build before pack. The upstream project sets GeneratePackageOnBuild.

dotnet build Compare-NET-Objects/Compare-NET-Objects.csproj -c Release
dotnet pack Compare-NET-Objects/Compare-NET-Objects.csproj -c Release --no-build -o /tmp/sharpassert-no-drawing-feed

Restore SharpAssert with this local feed:

dotnet restore SharpAssert.sln -p:RestoreAdditionalProjectSources=/tmp/sharpassert-no-drawing-feed

The feed path is a local setting. Do not add it to shared NuGet configuration.

Before a SharpAssert release, publish this fork package to the package source used by consumers. Local restore does not prove that a clean CI runner can find the package.

Release

Set up the NuGet Trusted Publishing policy with these values:

Field Value
GitHub owner yevhen
Repository Compare-Net-Objects
Workflow file publish.yml
Environment Leave empty
Package pattern SharpAssert.CompareNETObjects
Scopes Publish new packages and new versions

The workflow uses the NuGet account yevhen, as in SharpAssert. It does not use a stored API key.

After the policy is active:

  1. Check that the Build package workflow passed on main.
  2. Check that the project Version matches the version to publish.
  3. Create and push v4.84.0-sharpassert.1 for the first release.

The tag must match the project Version. The publish workflow builds and tests the package, downloads that tested artifact, obtains a temporary NuGet key, and publishes it. Branch pushes and pull requests cannot publish. Duplicate package versions fail rather than skip publication.

For later releases, change the project Version and push its matching v tag.

Checks

SharpAssert's ComparisonDependencyFixture checks that the assembly has no System.Drawing.Common reference and that dictionary, DateOnly, TimeOnly, and DataTable comparisons still work. Its EquivalencyFixture and ObjectComparisonFixture check the SharpAssert integration.

The Build package workflow also runs Fork.PackageTests against the packed NuGet artifact. It checks that the package graph has no System.Drawing.Common or upstream CompareNETObjects dependency, and checks nested differences, cycles, collections, duplicate counts, custom comparers, and member exclusions.

The original license remains in License.txt and in the NuGet package.

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SharpAssert.CompareNETObjects:

Package Downloads
SharpAssert.Runtime

Core assertion library for SharpAssert

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.84.0-sharpassert.1 119 10/1/2026

Remove font comparison and the System.Drawing.Common dependency.