SharpAssert.CompareNETObjects
4.84.0-sharpassert.1
dotnet add package SharpAssert.CompareNETObjects --version 4.84.0-sharpassert.1
NuGet\Install-Package SharpAssert.CompareNETObjects -Version 4.84.0-sharpassert.1
<PackageReference Include="SharpAssert.CompareNETObjects" Version="4.84.0-sharpassert.1" />
<PackageVersion Include="SharpAssert.CompareNETObjects" Version="4.84.0-sharpassert.1" />
<PackageReference Include="SharpAssert.CompareNETObjects" />
paket add SharpAssert.CompareNETObjects --version 4.84.0-sharpassert.1
#r "nuget: SharpAssert.CompareNETObjects, 4.84.0-sharpassert.1"
#:package SharpAssert.CompareNETObjects@4.84.0-sharpassert.1
#addin nuget:?package=SharpAssert.CompareNETObjects&version=4.84.0-sharpassert.1&prerelease
#tool nuget:?package=SharpAssert.CompareNETObjects&version=4.84.0-sharpassert.1&prerelease
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.IsFontand 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:
- Check that the Build package workflow passed on
main. - Check that the project Version matches the version to publish.
- Create and push
v4.84.0-sharpassert.1for 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 | Versions 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. |
-
net8.0
- System.Configuration.Configurationmanager (>= 8.0.0)
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.