build process - Castle Windsor WCF Facility doesn't work in release mode when code optimizations or full-pdb are disabled -


i develop project uses castle windsor wcf integration facility ddd architecture. there single container project, single domain project, several implementation projects , executable console. dependency tree can shown below:

console(exe) -> container(windsor) -> { implementations -> domaininterfaces }

console project invokes container.bootstrapper.initialize() , castle installers search assembly in method. in debug mode, works successfully, windsor loads dependencies , creates wcf service. when cursor enters initialize, can see newly loaded modules in modules window.

dependency installation code shown below:

public void install(iwindsorcontainer container, iconfigurationstore store) {     container = new windsorcontainer().addfacility<wcffacility>()     .register     (         component.for<idataprovider>().instance(new dataprovider(s_dataconfigurationelement)).lifestyle.singleton,         component.for<iuserrepository>().implementedby<userrepository>().lifestyle.singleton,         component.for<idomainmanager>().implementedby<domainmanager>().lifestyle.singleton,         component.for<igateway>().implementedby<gateway>().lifestyle.perthread.aswcfservice()     ); } 

problem in release mode. could't set breakpoint method , installers couldn't work, nothing loaded in modules window. in release mode, works if code optimization unchecked , full-pdb debug info checked in project options of console project. known issue or bug?

thanks in advance.

you should never reassign container parameter in installer class. mystery me, why worked in debug mode.

try instead:

public void install(iwindsorcontainer container, iconfigurationstore store) {     container.addfacility<wcffacility>();     container.register(         component.for<idataprovider>().instance(new dataprovider(s_dataconfigurationelement)),         component.for<iuserrepository>().implementedby<userrepository>(),         component.for<idomainmanager>().implementedby<domainmanager>(),         component.for<igateway>().implementedby<gateway>().aswcfservice()); } 

Comments