Lucky Penny Software Bundle - includes MediatR v14.1.0

Released: Mar 3, 2026

MediatR v14.1.0 での更新項目

機能

  • Migrated the solution from the traditional .sln format to the newer .slnx (XML-based solution) format, updating target frameworks to .NET 10 and upgrading dependency versions accordingly.
    • Migration from MediatR.sln to MediatR.slnx with improved XML-based structure.
    • Upgrade of target framework from net6.0 to net10.0 in benchmark projects.
    • Update of Microsoft.Extensions.DependencyInjection from version 8.0.0 to 10.0.0.
    • Removal of coverlet.collector package reference from dependency injection tests.
  • Added robust handling for F# assemblies and other assemblies that may throw ReflectionTypeLoadException when accessing their defined types. The changes introduce a new extension method GetLoadableDefinedTypes that gracefully catches these exceptions and returns only the successfully loaded types.
  • Simplified CheckLicense to use GetRequiredService instead of fallback constructors.
  • Log warning when perpetual license cannot be applied due to missing build date.

不具合の修正

  • Removed Azure-dependent CI steps to fix forked PR builds.
  • Fixed handling nested generic arguments where AddOpenBehavior fails to register pipeline behaviors with nested generic parameters (e.g., IPipelineBehavior<TRequest, List<TItem>>). The fix introduces assembly scanning to explicitly close open behaviors when their response type is a nested generic, working around a DI container limitation.
  • Fixed cryptic "No constructor" Error When ILoggerFactory Is Not Registered. Now providing clearer error messages when ILoggerFactory is not registered before AddMediatR() is called. The PR aims to replace the cryptic "No constructor for type 'MediatR.Licensing.LicenseAccessor' can be instantiated" error with an actionable message directing users to call services.AddLogging().
  • De-duping notification handlers before dispatching. Fixed issue where notification handlers were being called multiple times when using DI containers that support variance (e.g., DryIoc). When a derived notification type (E2 : E1) exists alongside handlers for both base (C1 : INotificationHandler) and derived types (C2 : INotificationHandler), publishing E2 would incorrectly invoke C1 twice due to the contravariant interface combined with MediatR's intentional dual registration for MSDI compatibility.