diff --git a/Directory.Build.props b/Directory.Build.props
index 94e58ab692..b11ffc52be 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -3,7 +3,7 @@
5.0.0
-
+
16.8.3
diff --git a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs
index a51637e3e7..024fc3a258 100644
--- a/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs
+++ b/framework/src/Volo.Abp.Autofac/Autofac/Extensions/DependencyInjection/AutofacRegistration.cs
@@ -1,6 +1,6 @@
// This software is part of the Autofac IoC container
// Copyright © 2015 Autofac Contributors
-// https://autofac.org
+// http://autofac.org
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
@@ -24,12 +24,9 @@
// OTHER DEALINGS IN THE SOFTWARE.
using System;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using Autofac.Builder;
using Microsoft.Extensions.DependencyInjection;
-using Volo.Abp;
using Volo.Abp.Modularity;
namespace Autofac.Extensions.DependencyInjection
@@ -48,62 +45,16 @@ namespace Autofac.Extensions.DependencyInjection
/// The into which the registrations should be made.
///
///
- /// A container builder that can be used to create an .
+ /// The set of service descriptors to register in the container.
///
public static void Populate(
- this ContainerBuilder builder,
- IServiceCollection services)
+ this ContainerBuilder builder,
+ IServiceCollection services)
{
- Populate(builder, services, null);
- }
-
- ///
- /// Populates the Autofac container builder with the set of registered service descriptors
- /// and makes and
- /// available in the container. Using this overload is incompatible with the ASP.NET Core
- /// support for .
- ///
- ///
- /// The into which the registrations should be made.
- ///
- ///
- /// A container builder that can be used to create an .
- ///
- ///
- /// If provided and not then all registrations with lifetime are registered
- /// using
- /// with provided
- /// instead of using .
- ///
- ///
- ///
- /// Specifying a addresses a specific case where you have
- /// an application that uses Autofac but where you need to isolate a set of services in a child scope. For example,
- /// if you have a large application that self-hosts ASP.NET Core items, you may want to isolate the ASP.NET
- /// Core registrations in a child lifetime scope so they don't show up for the rest of the application.
- /// This overload allows that. Note it is the developer's responsibility to execute this and create an
- /// using the child lifetime scope.
- ///
- ///
- public static void Populate(
- this ContainerBuilder builder,
- IServiceCollection services,
- object lifetimeScopeTagForSingletons)
- {
- if (services == null)
- {
- throw new ArgumentNullException(nameof(services));
- }
+ builder.RegisterType().As();
+ builder.RegisterType().As();
- builder.RegisterType().As().ExternallyOwned();
- var autofacServiceScopeFactory = typeof(AutofacServiceProvider).Assembly.GetType("Autofac.Extensions.DependencyInjection.AutofacServiceScopeFactory");
- if (autofacServiceScopeFactory == null)
- {
- throw new AbpException("Unable get type of Autofac.Extensions.DependencyInjection.AutofacServiceScopeFactory");
- }
- builder.RegisterType(autofacServiceScopeFactory).As();
-
- Register(builder, services, lifetimeScopeTagForSingletons);
+ Register(builder, services);
}
///
@@ -113,33 +64,18 @@ namespace Autofac.Extensions.DependencyInjection
/// The object registration style.
/// The registration being built.
/// The lifecycle specified on the service registration.
- ///
- /// If not then all registrations with lifetime are registered
- /// using
- /// with provided
- /// instead of using .
- ///
///
/// The , configured with the proper lifetime scope,
/// and available for additional configuration.
///
private static IRegistrationBuilder