Castle.TypedFactory.DefaultInterfaceFactoryComponentSelector could not be resolved
Asked Answered
P

3

12

I am following example by José F. Romaniello on session management with NHibernate. It's a very good article, however I'm struggling with it having very little experience with NHibernate, Windsor and MVC.

I am trying to re-create NHibernateInstaller, however encountering the following error: Component Castle.TypedFactory.DefaultInterfaceFactoryComponentSelector could not be resolved. Make sure you didn't misspell the name, and that component is registered.

In the sample project provided this error does not crop up, even though the installer is identical and Google does not come up with any results (which is very unusual). What causes this and how can it be avoided?

Procurator answered 16/6, 2011 at 16:16 Comment(0)
N
31

it seems a problem with the TypedFactoryFacility... are you doing this?

kernel.AddFacility<TypedFactoryFacility>();

before running all the installers?

Notion answered 16/6, 2011 at 17:50 Comment(2)
Somebody needed to point out the obvious - thank you. I did do this, but only after inline declaration and installation!Procurator
Yep, got the same issue while following the entry (joseoncode.com/2011/03/07/…). Thanks for the pointerGavrielle
O
0

uncomment the following code in Bootstrapper.cs file.

container.AddFacility();

Odonnell answered 6/11, 2012 at 3:1 Comment(0)
M
0

This happened to me when I created my own implementation of ITypedFactoryComponentSelector, but forgot to register the selector itself.

There was no indication this was the actual problem (and the kernel debug information assured me the components can be resolved) - but registering it fixed the issue.

Hope this helps someone :-)

Munroe answered 4/1, 2016 at 12:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.