title: Is it possible for Castle Windsor to resolve types loaded after an application starts?
body: <p>Say I setup my app.config to specify a type that my current application knows nothing about. Then I use AppDomain.Load(byte[]) to load the assembly before instantiating an instance of my WindsorContainer. </p>
  
  <p>Can Windsor resolve the type? Here's an example:</p>
  
  <p>Castle config:</p>
  
  <pre><code>&lt;castle&gt;
   &lt;components&gt;
     &lt;component id="test" service="Application.Services.ITestService, Application.Services" type="TestLibrary.TestService, TestLibrary"/&gt;
   &lt;/components&gt;
  &lt;/castle&gt;
  </code></pre>
  
  <p>Then in my code:</p>
  
  <pre><code>byte[] buffer = File.ReadAllBytes("TestLibrary.dll");
  AppDomain.CurrentDomain.Load(buffer);
  
  /* the assembly is now loaded and if I iterate AppDomain.GetAssemblies() is shows there */
  
  WindsorContainer container = new WindsorContainer(new XmlInterpreter());/* here I get  "The type name TestLibrary.TestService, TestLibrary could not be located" */
  
  ITestService resolvedService = container.Resolve&lt;ITestService&gt;("test"); 
  </code></pre>
  
  <p><strong>Edit:</strong><br/></p>
  
  <p>I've found that this does work:</p>
  
  <pre><code>Assembly testLibrary = Assembly.LoadFile("TestLibrary.dll");
  AppDomain.CurrentDomain.Load(testLibrary.GetName());
  
  WindsorContainer container = new WindsorContainer(new XmlInterpreter());
  ITestService service = container.Resolve&lt;ITestService&gt;("test");
  </code></pre>