NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #2745 most downloaded on NuGet
An extension for Autofac-IoC to use MediatR and CQRS with ease.
Last release 5 months ago
22 Apr 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 44 of 45 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
45 releases · first in 2018
feat: update deps to latest versions
feat: update deps to latest versions
Autofac to 9.1.0MediatR to 14.1.0chore: update deps and framework-version
One column per quarter.
Autofac to 9.0.0MediatR to 14.0.0chore: update deps and cut release 13.1.0
chore: update deps and cut release 13.1.0
chore: update README and raise version
chore: update README and raise version
Autofac to 8.3.0MediatR to 13.0.0MediatR with version 13.0.0 now requires a license key. As of now, you can pass in any string and it works (but we don't know when it will stop working).
You can read more about that here on how to acquire a license.
The only change you will have to do is the following:
Before update to 13.0.0:
var configuration = MediatRConfigurationBuilder
.Create(assemblyOne, assemblyTwo)
.WithAllOpenGenericHandlerTypesRegistered()
.Build();
After update to 13.0.0:
var configuration = MediatRConfigurationBuilder
.Create("yourLicenseKeyGoesHere", assemblyOne, assemblyTwo)
.WithAllOpenGenericHandlerTypesRegistered()
.Build();
## Features * Update Autofac to 8.2.0
Autofac to 8.2.0## Features * Update MediatR to 12.4.1 * Update Autofac to 8.1.1
MediatR to 12.4.1Autofac to 8.1.1## Features * Update MediatR to 12.3.0
MediatR to 12.3.0feat: update to latest Autofac version
feat: update to latest Autofac version
Autofac to 8.0.0. For the list of breaking-changes, take a look at the official release## Chores * Update MediatR to 12.2.0
MediatR to 12.2.0chore: update Autofac to latest version
chore: update Autofac to latest version
## Chores * Update Autofac to 7.0.1 * Update MediatR to 11.1.1
Autofac to 7.0.1MediatR to 11.1.1Autofac has been updated to version 7.0.0. There are a set of breaking changes. Some of them will not have any effects on you but you will need to eva…
MediatR. From now on you will require to use builder.RegisterMediatR(MediatRConfiguration) and provide a MediatRConfiguration using MediatRConfigurationBuilder.Autofac has been updated to version 7.0.0. There are a set of breaking changes. Some of them will not have any effects on you but you will need to evaluate that. Please check out this link for more details.Autofac to 7.0.0MediatR to 11.0.1MediatR has been updated to version 12.0.0. There are a set of breaking changes that you will need to fix. Please follow the migration guide for more…
MediatR. From now on you will require to use builder.RegisterMediatR(MediatRConfiguration) and provide a MediatRConfiguration using MediatRConfigurationBuilder.MediatR has been updated to version 12.0.0. There are a set of breaking changes that you will need to fix. Please follow the migration guide for more details.IMediator, ISender, IPublisher)INotificationPublisherIRequestHandler<> which is required for MediatR version 12.0.0ServiceProviderWrapper that implements IServiceProvider and uses ILifeTimeScope to resolve servicesServiceProviderWrapper to the container but only if typeof(IServiceProvider) has not been registered yetnetstandard2.0 to align with MediatRAll extensions method on ContainerBuilder have been marked as deprecated and will be removed with version 10.0.0. Please use builder.RegisterMediatR(M…
MediatR dependencies as either Transient or Scoped. Transient translates to InstancePerDependency whereas Scoped translates to InstancePerLifetimeScopeContainerBuilder have been marked as deprecated and will be removed with version 10.0.0. Please use builder.RegisterMediatR(MediatRConfiguration)Update MediatR to version 11.0.0
MediatR to version 11.0.0Autofac to version 6.5.0Update MediatR to version 11.0.0
MediatR to version 11.0.0IPipelineBehavior<TRequest, TResponse>. Please see the release-notes of MediatR for more details.Expose MediatRConfiguration and MediatRConfigurationBuilder as a new way to build the MediatR configuration
MediatRConfiguration and MediatRConfigurationBuilder as a new way to build the MediatR configurationMediatRConfiguration as a parameterMediatRConfiguration. Closes #10## Features * Update Autofac to 6.4.0
Autofac to 6.4.0## Features * Update MediatR to 10.0.1
MediatR to 10.0.1MediatR version 10.0.0 dropped support for netstandard2.0. From now own only netstandard2.1 is supported
MediatR version 10.0.0 dropped support for netstandard2.0. From now own only netstandard2.1 is supportedAddMediatR have been removedIStreamRequestHandler<,> and IStreamRequestPipelineBehavior<,>## Features * Update Autofac to 6.3.0
Autofac to 6.3.0Register types IRequestPreProcessor<> and IRequestPostProcessor<,> of provided assembly. Implements #7
IRequestPreProcessor<> and IRequestPostProcessor<,> of provided assembly. Implements #7Upgrade Autofac to version 6.2.0
Autofac to version 6.2.0Upgrade Autofac to version 6.1.0
Autofac to version 6.1.0netstandard2.1MediatR has been updated to version 9.0.0. This release contains minor breaking changes. Check out the blog-post for more details.
MediatR has been updated to version 9.0.0. This release contains minor breaking changes. Check out the blog-post for more details.AddMediatR has been marked as deprecated and will be removed with version 7.0.0.
Autofac has been updated to version 6.0.0. This release contains many new features but also breaking-changes. Check out this blog-post for more information.AddMediatR has been marked as deprecated and will be removed with version 7.0.0.Autofac syntax for registering dependencies. Please use RegisterMediatR instead of AddMediatRUpdate MediatR to version 8.1.0
MediatR to version 8.1.0Update MediatR to version 8.0.2. This enables nullable features of C#8
MediatR to version 8.0.2. This enables nullable features of C#8Update Autofac to version 5.2.0
Autofac to version 5.2.0Update Autofac to version 5.1.1
Autofac to version 5.1.1Autofac has been updated to 5.0.0. The release of Autofac contains breaking changes, mostly making the container immutable. You can read more about th…
Autofac has been updated to 5.0.0. The release of Autofac contains breaking changes, mostly making the container immutable. You can read more about the changes here.MediatR has been updated to 8.0.0. This major release contains small breaking changes. Check out this post for more information.
MediatR has been updated to 8.0.0. This major release contains small breaking changes. Check out this post for more information.IRequestHandler<,> and INotificationHandler<>. To prevent this from happening, .AsImplementedInterfaces() has been removed from the registration.
If you wish to register it like before, use this code after calling the extension method AddMediatR.var openHandlerTypes = new[]
{
typeof(IRequestHandler<,>),
typeof(IRequestExceptionHandler<,,>),
typeof(IRequestExceptionAction<,>),
typeof(INotificationHandler<>),
};
foreach (var openHandlerType in openHandlerTypes)
{
builder.RegisterAssemblyTypes(this.assemblies)
.AsClosedTypesOf(openHandlerType)
.AsImplementedInterfaces();
}
ContainerBuilderExtensions.MediatR version 8.0.0 by registering the new behaviors and open-handlers for handling exceptions. Check out this post for more information.Make sure that MediatRModule does not throw when no custom types are passed into the extension methods, fixes #4
MediatRModule does not throw when no custom types are passed into the extension methods, fixes #4It is now possible to pass in behaviors that implement IPipelineBehavior .
IPipelineBehavior<TRequest, TResponse>.public LoggingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{
private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;
public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger)
{
_logger = logger;
}
public Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{
_logger.LogInformation("Got request at {requestTime} and content", DateTime.UtcNow().ToString("O"), JsonConvert.SerializeObject(request));
return next();
}
}
public CachingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{
private readonly ILogger<CachingBehavior<TRequest, TResponse>> _logger;
private readonly ICache _cache;
public CachingBehavior(ILogger<CachingBehavior<TRequest, TResponse>> logger, ICache cache)
{
_logger = logger;
_cache = cache;
}
public async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{
var key = GenerateKeyFromRequest(request);
_cache.TryGetValue(key, out var cachedResponse)
{
_logger.LogInformation("{key} found in cache, using cached-value", key);
return await cachedResponse;
}
var response = next();
_cache.Set(key, response);
return await response;
}
}
We would register MediatR like that
var containerBuilder = new ContainerBuilder();
// Since there are two default behaviors the execution order would now be the following
// 1. LoggingBehavior<TRequest, TResponse>
// 2. CachingBehavior<TRequest, TResponse>
// 3. RequestPreProcessorBehavior<TRequest, TResponse>
// 4. RequestPostProcessorBehavior<TRequest, TResponse>
containerBuilder.RegisterMediatR(typeof(SomeClassThatIsInSameAssemblyAsMediatRTypes).Assembly,
typeof(CachingBehavior<,>), typeof(LoggingBehavior<,>));
public LoggingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{
private readonly ILogger<LoggingBehavior<TRequest, TResponse>> _logger;
public LoggingBehavior(ILogger<LoggingBehavior<TRequest, TResponse>> logger)
{
_logger = logger;
}
public Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{
_logger.LogInformation("Got request at {requestTime} and content", DateTime.UtcNow().ToString("O"), JsonConvert.SerializeObject(request));
return next();
}
}
public CachingBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> where TRequest : class, ICacheableRequest<TResponse>
{
private readonly ILogger<CachingBehavior<TRequest, TResponse>> _logger;
private readonly ICache _cache;
public CachingBehavior(ILogger<CachingBehavior<TRequest, TResponse>> logger, ICache cache)
{
_logger = logger;
_cache = cache;
}
public async Task<TResponse> Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate<TResponse> next)
{
var key = GenerateKeyFromRequest(request);
_cache.TryGetValue(key, out var cachedResponse)
{
_logger.LogInformation("{key} found in cache, using cached-value", key);
return await cachedResponse;
}
var response = next();
_cache.Set(key, response);
return await response;
}
}
We would register MediatR like that again
var containerBuilder = new ContainerBuilder();
// Since there are two default behaviors, two custom behaviors and one with a constraint, the execution order would now be the following
// 1. CachingBehavior<TRequest, TResponse>
// 2. LoggingBehavior<TRequest, TResponse>
// 3. RequestPreProcessorBehavior<TRequest, TResponse>
// 4. RequestPostProcessorBehavior<TRequest, TResponse>
containerBuilder.RegisterMediatR(typeof(SomeClassThatIsInSameAssemblyAsMediatRTypes).Assembly,
typeof(CachingBehavior<,>), typeof(LoggingBehavior<,>));
For more specifics please checkout the tests
Update Autofac to version 4.9.4
Update MediatR to version 7.0.0. Please see the changelog of MediatR since it contains breaking-changes for the request post-processors.
Nothing published for this version
Update Autofac to version 4.9.2
Support older .NET-Framework versions by using typeof(T).GetTypeInfo().Assembly rather than typeof(T).Assembly. Closes #1
typeof(T).GetTypeInfo().Assembly rather than typeof(T).Assembly. Closes #1The latest implementation might contain breaking changes, if you did overrider MediatR's default behaviours. For more information please checkout the…
## Chore * Adjust package-infos
## Features * Update MediatR to 5.1.0
## Features * Allow chaining of method-calls
## Chore * update project file
Allow MediatR and it's components to be registered via an extension method for Autofac.
Your coding agent can read these notes before it upgrades. Set up the MCP server →