{"action":"opened","issue":{"url":"https://api.github.com/repos/castleproject/Windsor/issues/95","labels_url":"https://api.github.com/repos/castleproject/Windsor/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/castleproject/Windsor/issues/95/comments","events_url":"https://api.github.com/repos/castleproject/Windsor/issues/95/events","html_url":"https://github.com/castleproject/Windsor/issues/95","id":99946689,"number":95,"title":"Trying to load configuration from Installer results in duplicate registrations","user":{"login":"richardspence","id":9914123,"avatar_url":"https://avatars.githubusercontent.com/u/9914123?v=3","gravatar_id":"","url":"https://api.github.com/users/richardspence","html_url":"https://github.com/richardspence","followers_url":"https://api.github.com/users/richardspence/followers","following_url":"https://api.github.com/users/richardspence/following{/other_user}","gists_url":"https://api.github.com/users/richardspence/gists{/gist_id}","starred_url":"https://api.github.com/users/richardspence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardspence/subscriptions","organizations_url":"https://api.github.com/users/richardspence/orgs","repos_url":"https://api.github.com/users/richardspence/repos","events_url":"https://api.github.com/users/richardspence/events{/privacy}","received_events_url":"https://api.github.com/users/richardspence/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-10T01:14:36Z","updated_at":"2015-08-10T01:14:36Z","closed_at":null,"body":"This is my first time playing with Castle, so maybe I'm doing something idiotic:\r\n\r\nI'm creating a new Container that loads an xml file.  That xml file loads a custom installer.  The custom installer will feed additional xml files.  Doing this components fed at the custom installer level are somehow registered twice causing a typeinitializer exception.\r\n\r\nHere is some of the code\r\n```C#\r\n internal class CastleContainer\r\n    {\r\n        static CastleContainer()\r\n        {\r\n            var path = System.AppDomain.CurrentDomain.BaseDirectory+\"Windsor.config\";\r\n            Current = new WindsorContainer(new XmlInterpreter(path));\r\n        }\r\n        public static IWindsorContainer Current { get; internal set; }\r\n    }\r\n    public class DatabaseInstaller : IWindsorInstaller\r\n    {\r\n        public void Install(IWindsorContainer container, IConfigurationStore store)\r\n        {\r\n            var source = new InMemoryResource();\r\n            ////XmlInterpreter xi = new XmlInterpreter(source);\r\n            ////xi.ProcessResource(xi.Source, store, container.Kernel);\r\n            //var kernel = container.Kernel;\r\n            //IResourceSubSystem resourceSubSystem = kernel.GetSubSystem(SubSystemConstants.ResourceKey) as IResourceSubSystem;\r\n            //resourceSubSystem.RegisterResourceFactory(new DatabaseResourceFactory());\r\n\r\n            container.Install(Configuration.FromXml(source));\r\n        }\r\n\r\n        internal class DatabaseResourceFactory : IResourceFactory\r\n        {\r\n            public bool Accept(CustomUri uri)\r\n            {\r\n                return \"db\".Equals(uri.Scheme);\r\n            }\r\n\r\n            public IResource Create(CustomUri uri)\r\n            {\r\n                return this.Create(uri, null);\r\n            }\r\n\r\n            public IResource Create(CustomUri uri, string basePath)\r\n            {\r\n                return new InMemoryResource();\r\n            }\r\n        }\r\n\r\n        public class InMemoryResource : IResource\r\n        {\r\n            public string FileBasePath\r\n            {\r\n                get\r\n                {\r\n                    throw new NotImplementedException();\r\n                }\r\n            }\r\n\r\n            public IResource CreateRelative(string relativePath)\r\n            {\r\n                throw new NotImplementedException();\r\n            }\r\n\r\n            public void Dispose()\r\n            {\r\n            }\r\n\r\n            public TextReader GetStreamReader()\r\n            {\r\n                var config = @\"<configuration>  <components>    <component id=\"\"ConfigRepository\"\" service=\"\"SimpleService.IMyService,SimpleService\"\" type=\"\"SimpleService.MyService2,SimpleService\"\" >      <parameters>        <innerRepositoryKey>ConfigRepository.nh</innerRepositoryKey>      </parameters>    </component>  </components></configuration> \";\r\n                return (new StringReader(config));\r\n            }\r\n\r\n            public TextReader GetStreamReader(Encoding encoding)\r\n            {\r\n                return GetStreamReader();\r\n            }\r\n        }\r\n    }\r\n\r\n```\r\n```xml\r\n<configuration>\r\n  <installers>\r\n    <install assembly=\"WindsorSandbox\"/>\r\n  </installers>\r\n</configuration>\r\n```\r\n\r\n\r\n"}}