System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: AspNetWebApp.IOtherService Lifetime: Scoped ImplementationType: AspNetWebApp.MyService': Implementation type 'AspNetWebApp.MyService' can't be converted to service type 'AspNetWebApp.IOtherService')
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: AspNetWebApp.IOtherService Lifetime: Scoped ImplementationType: AspNetWebApp.MyService': Implementation type 'AspNetWebApp.MyService' can't be converted to service type 'AspNetWebApp.IOtherService'
---> System.ArgumentException: Implementation type 'AspNetWebApp.MyService' can't be converted to service type 'AspNetWebApp.IOtherService'
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ConstructorCallSite..ctor(ResultCache cache, Type serviceType, ConstructorInfo constructorInfo, ServiceCallSite[] parameterCallSites)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(ResultCache lifetime, Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain, Int32 slot)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.GetCallSite(ServiceDescriptor serviceDescriptor, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider.ValidateService(ServiceDescriptor descriptor)
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
--- End of inner exception stack trace ---
at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(ICollection`1 serviceDescriptors, ServiceProviderOptions options)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
at Microsoft.Extensions.Hosting.HostApplicationBuilder.Build()
at Microsoft.AspNetCore.Builder.WebApplicationBuilder.Build()
at Program.<Main>$(String[] args) in \AspNetPlaygroung\AspNetWebApp\Program.cs:line 13