CAstle Windsor: How to reference a second xml config file that is an embedded resource? -
we have 1 xml configuration file use in production. have little test app has couple of additional needs. i'd create second, testing-only xml config file references embedded production configuration file. there way this?
i'm aware of "include" element, not sure in file supposed placed--in castle node? components node?
i feel answer here i'm dense figure out.
thanks can provide.
update
this how our production config file set up:
<?xml version="1.0" encoding="utf-8"?> <ourcompany> <framework> <castle> <installers> <!-- installers--> <installers> <components> <!--some components--> <components> <castle> <framework> <ourcompany> my recent attempt @ non-production config file looks this:
<?xml version="1.0" encoding="utf-8"?> <ourcompany> <framework> <castle> <include uri="assembly://assemblycontainingembeddedxml/myembeddedconfig.xml" /> <components> <!--components want registered container when running in non-production environment--> <components> <castle> <framework> <ourcompany> the exception reads:
configuration parser encountered framework, expecting find installers, facilities or components. there might either typo on or might have forgotten nest properly.
(in actual message, "framework," "installers," "facilities," , "components" enclosed in angle brackets.)
the bottom of page reference has example of loading embedded resourced:
iresource resource = new assemblyresource("assembly://acme.crm.data/configuration/services.xml"); container = new windsorcontainer(new xmlinterpreter(resource));
Comments
Post a Comment