After registering an open generic type in Autofac, I got the following error when running the application:
Here is the code I was using to register my MediatR behavior in Autofac:
Turns out that if you are using open generics you have to use a different method on the Autofac container builder:
More information in the Autofac documentation: https://autofaccn.readthedocs.io/en/latest/register/registration.html#open-generic-components