Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CastleWindsor 3.0 and DefaultServiceHostFactory.RegisterContainer()?

The following does not compile:

DefaultServiceHostFactory.RegisterContainer(Container.Kernel);

The static method does not seem to exist in Castle 3.0 - I checked the breakingchanges.txt and did not see this listed.

What am I missing?

like image 269
znelson Avatar asked Mar 15 '12 22:03

znelson


1 Answers

You don't need the call any more as it gets registered when you wire up the facility.

container.AddFacility<WcfFacility>();

Is all you need, sweet :)

This is not required:

DefaultServiceHostFactory.RegisterContainer(Container.Kernel);

nor is this

Container.Register(Component.For<DefaultServiceHostFactory>());

like image 177
Bronumski Avatar answered Oct 22 '22 02:10

Bronumski