Everything that is in the bin folder will be loaded into the current application domain, therefore, as a rule, this is not a problem. However, when avoiding version conflicts, you can use a custom assembly collector to load multiple assemblies / versions into the same AppDomain. This will allow you to connect additional builds to the AppDomain web api.
public class CustomAssemblyResolver : DefaultAssembliesResolver { public override ICollection GetAssemblies() {
Then you will replace the default assembly converter for the web api in the configuration.
config.Services.Replace(typeof(IAssembliesResolver), new CustomAssemblyResolver());
config.Services.Replace(typeof(IAssembliesResolver), new CustomAssemblyResolver());
When the web api goes to search for assemblies to find the controllers, it will now use all additional assemblies. See this example for more details.
source share