I have a solution in which I use IoC (windsor). The projects in the solution are as follows:
- Interfaces - Holds all the interface contracts I'll use.
- IoC.Installers - Holds all the installers for my dependencies (has reference to impl. and interfaces)
- IoC - Holds a singleton class that holds the IoC container. The class performs the initialization process of the container.
- Console - The project that uses the IoC to resolve dependencies (has reference to interfaces an IoC)
The problem: Because the IoC project doesn't directly use the IoC.Installers project, it is omitted from the build process on the Console project, hence no installers are found during the initialization process.
The workaround: In the IoC project I added a static constructor that directly initiates an installer from the IoC.Installers project and uses it (I do a GetType() on the instance I make)
Problem with the workaround: I wanted to create some generic container holder that I could move from solution to solution without the need to fix my hack.
Is there a better way to force the IoC.Installers dll to be copied to the bin folder without the hack? The final aim is to create a nuget the wraps castlewindsor and tries to find all the installers in the solution and install them
I'm adding a link to a git repo in which I made a project that reproduces the problem (it contains the work around as well)
Thanks!