I don't think AllTypes.FromThisAssembly()
on it's own actually registers anything...
Try Pick()
container.Register(AllTypes.FromThisAssembly()
.Pick());
I'm still not 100% on the Fluent API yet though :)
This seems to clear it up:
Castle Windsor Fluent Registration - What does Pick() do?
So you can use Pick()
or AllTypes().Of<object>()
- specifying AllTypes()
without picking any types doesn't actually add any types to the container
You also need to specify the services that the components implement:
container.Register(AllTypes.FromThisAssembly()
.Pick().WithService.FirstInterface());
or
container.Register(AllTypes.FromThisAssembly()
.Pick().WithService.DefaultInterfaces());