jbogard / MediatR

Simple, unambitious mediator implementation in .NET
Apache License 2.0
11.21k stars 1.18k forks source link

Version 10 breaking changes #688

Closed steveoh closed 2 years ago

steveoh commented 2 years ago

It appeared the only breaking change was net 2.1 support. However when I just upgraded some pipeline behaviors stopped working with the following error

The type 'TRequest' cannot be used as type parameter 'TRequest' in the generic type or method 'IPipelineBehavior<TRequest, TResponse>'. There is no boxing conversion or type parameter conversion from 'TRequest' to 'MediatR.IRequest'

Is this expected?

jbogard commented 2 years ago

Good call. This is an additional breaking change, I created a migration to help:

https://github.com/jbogard/MediatR/wiki/Migration-Guide-9.x-to-10.0

steveoh commented 2 years ago

Will you put that link in the release notes?

jbogard commented 2 years ago

Done! And I'll update the blog post too

Sandeep7OnShell commented 2 years ago

@jbogard Getting below errors after upgrade to MediatR 10.0.1

  1. Reference to type 'IBaseRequest' claims it is defined in 'MediatR', but it could not be found
  2. Reference to type 'IRequest<>' claims it is defined in 'MediatR', but it could not be found
  3. Reference to type 'IRequest' claims it is defined in 'MediatR', but it could not be found

Any clues?