Hi Support Team,
Do you have any ideas what could be causing this error. https://github.com/aspnetboilerplate/aspnetboilerplate/issues/6755
I have been developing alone for a while now with no problems on version 12.4.2.
Recently something has happened to my machine and now when I try and browser to the swagger page (or run nwswag) I get the same error as linked in that article.
I could try and upgrade to version 13 which I believe is the version in which that issue is fixed. But I have others on my team using the same code as me who don't have the issue.
My guess is something related to either a windows or .net patch or update but we haven't been able to isolate it yet.
Do you have any ideas what could be causing this issue all of a sudden for me?
Thanks Rick
6 Answer(s)
-
0
Hi Rick,
This happens if you use a code block which tries to use IServiceProviderIsService. Could you share the full stack trace for the error ?
-
0
ERROR 2024-01-17 14:22:44,909 [9 ] nostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request. Castle.MicroKernel.Handlers.HandlerException: Can't create component 'Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider_8fe94c57-4043-438a-95e5-44fb6fc328fe' as it has dependencies to be satisfied.
'Microsoft.AspNetCore.Mvc.ApiExplorer.IApiDescriptionProvider_8fe94c57-4043-438a-95e5-44fb6fc328fe' is waiting for the following dependencies:
Service 'Microsoft.Extensions.DependencyInjection.IServiceProviderIsService' which was not registered.
at Castle.MicroKernel.Handlers.DefaultHandler.AssertNotWaitingForDependency() at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.ResolveAll(Type service, Arguments arguments, IReleasePolicy policy) at Castle.Windsor.MsDependencyInjection.MsCompatibleCollectionResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.TryResolveCore(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency, Object& value) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) at Castle.MicroKernel.Lifestyle.SingletonLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.ResolveFromKernelByType(CreationContext context, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.TryResolveCore(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency, Object& value) at Castle.MicroKernel.Resolvers.DefaultDependencyResolver.Resolve(CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateConstructorArguments(ConstructorCandidate constructor, CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.Instantiate(CreationContext context) at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, Arguments additionalArguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext) at Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments) at Castle.Windsor.MsDependencyInjection.ScopedWindsorServiceProvider.GetServiceInternal(Type serviceType, Boolean isOptional) at lambda_method3424(Closure, Object, HttpContext, IServiceProvider) at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
-
0
Just to add here. I was previously running VS 17.9.0 Preview 2 and Preview 3. Both of these have the problem with the above error.
I uninstalled my Visual Studios and went back to VS 17.8.5 the stable release and it's working again now.
Something in the upcoming Visual Studios breaks the ASP Boilerplate stuff prior to version 4.1 (or Aspnet Zero anything prior to v 13).
Not sure what it is but at least I'm running again.
-
0
Hi,
I'm glad that it is working now. I also coudln't find anything related to this. But, if you can upgrade Abp.* and Castle.Windsor.MsDependencyInjection NuGet packages, this should work with the latest version of VS.
-
0
We are at the version 12.3.1 and experienced the same issue when we tried using VS 17.9.x It was fixed after downgrading it to 17.8.5 Upgrading Castle.Windsor.MsDependencyInjection NuGet packages didn't help.
-
0
I have confirmed that 13.1.0 and the latest preview VS works again.