To make complex component registration i often use a class that inplements
IWindsorInstaller.
However this can cause monolithic compilations, for example:

   - App.exe
      - References
         - CustomInstaller.dll
      - class Program
         - Ioc = new WindsorContainer();
         - Ioc.Install(new CustomInstaller());
      - CustomInstaller.dll
      - References
         - ExternalLib.dll
      - class CustomInstaller : IWindsorInstaller

The monolitic compilation is caused by:
App.exe =depends on=> CustomInstaller.dll =depends on=> ExternalLib.dll

To break monolithic compilation i do the following trick

   - App.config
      - <component id="installer" service="Castle.Windsor.IWindsorInstaller,
      Castle.Windsor" type="CustomInstaller.CustomInstaller, CustomInstaller" />
   - class Program
      - Ioc = new WindsorContainer(new XmlInterpreter());
      - Ioc.Install(Ioc.ResolveAll<IWindsorInstaller>());

It would be nice to have this trick done automatically by WindsorContainer


-- 
Gian Marco Gherardi

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

Reply via email to