Autofac assembly scanning - .NET Core
问题 I've been trying to get assembly scanning working in my .NET core 2.0 project. The exception I am getting Autofac.Core.Registration.ComponentNotRegisteredException HResult=0x80131500 Message=The requested service 'Microsoft.AspNetCore.Hosting.Internal.WebHostOptions' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.