NServiceBus IoC Serialization Exception
I am using a "custom" object builder (Autofac) so I can re-use the
registration of many types that I have done in a common assembly. When I
run the service, hosted within NServiceBus.Host.exe, I get the following
error:
SerializationException was unhandled:
Type 'Autofac.Core.Registration.ComponentNotRegisteredException' in
assembly 'Autofac, Version=3.0.0.0, Culture=neutral,
PublicKeyToken=17863af14b0044da' is not marked as serializable.
This seems odd to me because NServiceBus uses Autofac by default and
doesn't have this same issue.
If you check the InnerException of this exception, you will find the reason of this dependency resolution issue.
ReplyDelete