Register all implementation of type T interface in .NET core

You could use Scrutor. With that, you can then scan and assign the handlers like this:

// Automatically discover and register all message handlers...
services.Scan(
    x =>
        {
            var entryAssembly = Assembly.GetEntryAssembly();
            var referencedAssemblies = entryAssembly.GetReferencedAssemblies().Select(Assembly.Load);
            var assemblies = new List<Assembly> { entryAssembly }.Concat(referencedAssemblies);

            x.FromAssemblies(assemblies)
                .AddClasses(classes => classes.AssignableTo(typeof(IEventHandler<>)))
                    .AsImplementedInterfaces()
                    .WithScopedLifetime();
        });