NServiceBus.Extensions.Hosting 1.0.1 - Patch release available

Hi everyone,

We’ve just released NServiceBus.Extensions.Hosting 1.0.1.

Fixed bugs

  • #52 Resolving non-transient types that implement IDisposable causes ComponentActivatorException with Castle.Windsor

How to know if you are affected

You are affected if you are using NServiceBus.Extensions.Hosting in combination with Castle.Windsor.

Symptoms

When trying to resolve types implementing IDisposable the following exception is raised:

Castle.MicroKernel.ComponentActivator.ComponentActivatorException:
Instance {ImplementationType} of component {IInterface}_affce5c5-40e5-4a45-96aa-144328d7346e is already being tracked.
The factory method providing instances of the component is reusing instances, but the lifestyle of the component is Transient which requires new instance each time.
In most cases it is advised for the factory method not to be handling reuse of the instances, but to chose a lifestyle that does that appropriately.
Alternatively, if you do not wish for Windsor to track the objects coming from the factory change your registration to ‘.UsingFactoryMethod(yourFactory, managedExternally: true)’

Should you upgrade immediately

You should upgrade immediately if you are using NServiceBus.Extensions.Hosting in combination with Castle.Windsor.

Where to get it

You can install the new version from NuGet.

With thanks,
The team in Particular

Please read our release policy for more details. Follow @ParticularNews to be notified of new releases and bug fixes.