Castle Windsor не может найти установщики в сборках

) У меня есть код в моем global.axax:

protected void Application_Start()
{
    WindsorContainer = new WindsorContainer();
    WindsorContainer.Install(FromAssembly.InDirectory(new AssemblyFilter(AppDomain.CurrentDomain.RelativeSearchPath)));
    ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(WindsorContainer.Kernel));
//...
}

Когда я отлаживаю global.asax, код FromAssembly.InDirectory (newAssemblyFilter (AppDomain. CurrentDomain.RelativeSearchPath)) находит все dll моего проекта (всего 7 dll). 3 из них содержат реализацию интерфейса IWindsorInstaller , например:

class WindsorInstaller : IWindsorInstaller
{
    public void Install(IWindsorContainer container, IConfigurationStore store)
    {
        var services = AllTypes.FromThisAssembly().Where(type => type.Name.EndsWith("Service"));
        container.Register(services
            .WithService.DefaultInterfaces()
            .Configure(c => c.LifestyleTransient()));
        container.Register(Component.For<ISession>().ImplementedBy<AspnetSession>().
            LifeStyle.Transient);
        container.Register(Component.For<ICache>().ImplementedBy<AspnetCache>().
            LifeStyle.Transient);
    }
}

Но когда я устанавливаю точки останова, вызывается только 1 установщик, 2 других пропущены. Забавно, но у меня есть еще один рабочий проект, из которого я скопировал код.

11
задан Evgeny Levin 4 February 2012 в 14:57
поделиться