I just had to write the following code:
public class MyReleasePolicy : Castle.MicroKernel.Releasers.LifecycledComponentsReleasePolicy
{
public override void Track(object instance, Castle.MicroKernel.Burden burden)
{
if (!instance.GetType().FullName.StartsWith("NServiceBus"))
{
base.Track(instance, burden);
}
}
}
and then this:
IoC.Container.Kernel.ReleasePolicy = new MyReleasePolicy();
to make a problem go away.
Can you come up with a WHY comment? (the category of this post is another hint)