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.
I am using Autofac v 3.1.1 and NServiceBus 4.0.3
AppDomains
? Exceptions are serialized across boundaries, so this could be why the failure appears to be due to missing serialization attribute. However, I agree with @Travis-illig, the underlying issue is likely to do with a missing registration. – Chris Bednarski