Skip to main content
Version: 2.13.14

Apply Humanizer 3 compatibility restorations

Orientation

3.0.8 is a compatibility boundary, not just a convenient patch sample. Published Humanizer.Core packages and tagged source show changes that alter the remediation required by users on either side.

3.0.1 to 3.0.8

Upgrade before investigating analyzer load failures on modern SDK hosts. 3.0.1 contains only a Roslyn 3.8 analyzer asset. 3.0.8 contains Roslyn 3.8, 4.8, and 4.14 variants plus evaluation-time fallback selection for hosts that cannot select a versioned component.

The same boundary restores string ToQuantity(int, ...) overloads and fixes first-word title casing. Remove local shims only after the package update and regression tests.

Evidence:

3.0.8 to 3.0.10

3.0.10 moves analyzer fallback selection into a target that runs before compilation and removes only the Humanizer analyzer variants before adding the Roslyn 3.8 fallback. This matters to older or non-version-aware MSBuild hosts that can otherwise load duplicate variants.

If 3.0.8 builds cleanly on every host, this update needs no source rewrite. Keep the package update because it removes a tooling-specific failure mode.

Evidence: package regression fix #1682 and the published 3.0.10 package.

Example

This illustrative project-wide check distinguishes migration diagnostics from analyzer loading failures:

dotnet clean
dotnet restore --force-evaluate
dotnet build
dotnet format analyzers --diagnostics HUMANIZER001 --severity info --verify-no-changes

An HUMANIZER001 result means the analyzer loaded and found old namespace usage. CS8032 or AD0001 points instead to analyzer loading or execution.

Pitfall

Do not add direct System.Memory, System.Collections.Immutable, or Roslyn package references to the application merely to make a bundled analyzer load. That changes the consumer dependency graph without fixing the packaged analyzer selection problem. Upgrade to 3.0.10 first.

Version notes

The default severity of HUMANIZER001 is error in 3.0.1, 3.0.8, and 3.0.10. The analyzer release ledger's older Warning row is not the descriptor compiled into those packages.