Refreshing loaded Assemblies during WebApi runtime
<p>I have a C# Owin WebApi Selfhost Project and the controllers I use are implemented in separate assemblies.
I´m finding these assemblies by naming conventions before I start up the WebApp and load them into the AppDomain. Then when the Api starts, the controllers are accessible. There is another approach which involves a custom IAssemblyResolver-class which replaces the default one in the Config.Services</p>

<pre><code>config.Services.Replace(typeof(IAssembliesResolver), new MyAssembliesResolver());
</code></pre>

<p>This also works, all my seperate controller-assemblies are found, loaded and accessible. </p>

<p>Now to the problem: It may occur, that a new controller-assembly appears in my executing directory. My Api has an "AssembliesController" which can be told to look for new assemblies in the executing directory and load them
during runtime. This also works, but the problem is: the controllers in the newly loaded assembly aren´t accessible until I restart my Api.</p>

<p>It appears that the Api just asks once for assemblies (IAssembliesResolver) and available controller types (IHttpControllerTypeResolver) on startup and works with the results until the end. But in my case I want to add assemblies/controllers during runtime without restarting the Api. Can somebody help me please? How do I get the Api to refresh the assemblies/controllers?</p>