You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Program
{
public static async Task Main(string[] args)
{
var testClass = new TestClass();
var container = new WindsorContainer();
container.Register(Component.For<ITestClass>().Instance(testClass));
await Host.CreateDefaultBuilder(args)
.UseWindsorContainerServiceProvider(container) // <-- This will cause the container to be cleared as if it was a brand newly instantiated container.
.RunAsync();
}
}
This happens right after a subsystem is added to the container
This happens right after a subsystem is added to the container
Windsor/src/Castle.Windsor.Extensions.DependencyInjection/WindsorServiceProviderFactoryBase.cs
Lines 61 to 67 in 28e7afa
Is this by design? Is there no way I could use the existing registrations prior to
.UseWindsorContainerServiceProvider(container)
?Update:
I just realized in the XML Documentation that all registrations will be cleared. Didn't notice that before.
Windsor/src/Castle.Windsor.Extensions.DependencyInjection/Extensions/HostBuilderExtensions.cs
Lines 59 to 68 in 28e7afa
Is it possible to copy the registrations back over?
The text was updated successfully, but these errors were encountered: