Skip to content

EF Core major guard: registering the differ by hand bypasses it and fails with MissingMethodException #91

Closed

Description

@CaffeinatedCoder

Problem

The EF Core major guard (#55) runs in every registration entry point, and on EF Core 11 rc.2 each of them throws the guard's message (consumer probe and code analysis of the 5.5.0 candidate). The one route around it is registering the public types by hand, e.g. optionsBuilder.ReplaceService<IMigrationsModelDiffer, CustomMigrationsModelDiffer>(): the differ constructs, and the first GetDifferences fails with MissingMethodException: …IIndex.get_Properties(), loud but with nothing that names the cause. No documentation recommends registering by hand.

Fix

Call EfCoreVersionGuard.ThrowIfUnsupported() from the differ's and the Npgsql generator's constructors too, so every route ends at the same message.

Found by the 5.5.0 pre-tag review (code review of #62, core analysis).

Activity

  1. added this to the 5.5.1 milestone on Oct 19, 2026
  2. added
    bug
    severity/low
    package/core
    package/postgresql
    package/sqlserver
    area/migrations
    on Oct 19, 2026
  3. modified the milestones: 5.5.1, 5.5.0 on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/migrationsbugpackage/corepackage/postgresqlpackage/sqlserverseverity/low

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions