Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingMethodException: IKernel IHandler.GetKernel() #669

Open
CollinAlpert opened this issue Mar 28, 2024 · 0 comments
Open

MissingMethodException: IKernel IHandler.GetKernel() #669

CollinAlpert opened this issue Mar 28, 2024 · 0 comments

Comments

@CollinAlpert
Copy link

I am occasionally seeing the following exception at startup of my application:

System.MissingMethodException: Method not found: 'Castle.MicroKernel.IKernel Castle.MicroKernel.IHandler.GetKernel()'.
    at Castle.Windsor.Extensions.DependencyInjection.Scope.ExtensionContainerRootScopeAccessor.GetScope(CreationContext context)
    at Castle.MicroKernel.Lifestyle.ScopedLifestyleManager.GetScope(CreationContext context)
    at Castle.MicroKernel.Lifestyle.ScopedLifestyleManager.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.Handlers.AbstractHandler.Resolve(CreationContext context)
    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.WindsorContainer.Resolve(Type service)
    at Castle.Windsor.Extensions.DependencyInjection.WindsorScopedServiceProvider.GetService(Type serviceType)
    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
    at Microsoft.Extensions.Hosting.HostBuilder.ResolveHost(IServiceProvider serviceProvider, DiagnosticListener diagnosticListener)
    at Microsoft.Extensions.Hosting.HostBuilder.Build()

I looked at the implementation of ExtensionContainerRootScopeAccessor.GetScope and am confused at how this could happen. As far as I can tell the implementation does not and never has called any method in IHandler.

I have referenced the following packages:

  • Castle.Core-NLog v5.1.1
  • Castle.LoggingFacility v6.0.0
  • Castle.Windsor.Extensions.Hosting v6.0.0

Implicitly referenced are the following packages:

  • Castle.Core v5.1.1
  • Castle.Windsor v6.0.0
  • Castle.Windsor.Extensions.DependencyInjection v6.0.0

It looks like I am up to date on all the dependencies and there should be no conflicting versions. Any ideas what this could be?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant