Closed marbletravis closed 4 years ago
I have been using MediatR in dotnet core 2.x for a couple of years now without any issues.
Today I decided to upgrade to dotnet core 3.1 and with it upgrade to the latest version of MediatR 8.0.x
The signature for AddMediatR changed, upon consulting the documentation, I tried: services.AddMediatR(typeof(Startup).GetTypeInfo().Assembly);
services.AddMediatR(typeof(Startup).GetTypeInfo().Assembly);
which did not work, I get an error saying
Register your handlers with the container. See the samples in GitHub for examples.
I have tried to find answers on the internet to no avail.
What I am doing wrong? Is there an upgrade guide for MediatR?
Thanks
I figured it out, I was thrown off by the readme, this is what I wanted:
services.AddMediatR(typeof(MyHandler));
with MyHandler being replaced by something from the assembly that had my handlers.
I have been using MediatR in dotnet core 2.x for a couple of years now without any issues.
Today I decided to upgrade to dotnet core 3.1 and with it upgrade to the latest version of MediatR 8.0.x
The signature for AddMediatR changed, upon consulting the documentation, I tried:
services.AddMediatR(typeof(Startup).GetTypeInfo().Assembly);
which did not work, I get an error saying
I have tried to find answers on the internet to no avail.
What I am doing wrong? Is there an upgrade guide for MediatR?
Thanks