Open sianabanana opened 2 years ago
Yes, MS are irritating, changing this all the time. I will try to fix this up ASAP
Wait, with the latest version, doesn't this work? builder.Host.UseServiceProviderFactory(new WindsorServiceProviderFactory());
Yes, sorry for not replying but i eventually found the solution. As you say
builder.Host.UseServiceProviderFactory(new WindsorServiceProviderFactory());
then i do
builder.Host.ConfigureContainer<WindsorContainer>((hostBuilderContext, container) =>
{
container.Kernel.Resolver.AddSubResolver(new ArrayResolver(container.Kernel));
etc.
Thanks for getting back to me
It would probs be useful to add an example to the library to save other peoples pain.
Are there any examples of how to use Castle Windsor with the new .net 6 Core minimal style
This site has a autofac example https://andrewlock.net/exploring-dotnet-6-part-10-new-dependency-injection-features-in-dotnet-6/
Is there a simmilar example for castle? i cant find a castle service provider factory for example.
Previously i was using the Castle.Windsor.MsDependencyInjection
WindsorRegistrationHelper.CreateServiceProvider(container, services);