c# - NServiceBus IoC Serialization Exception -


i using "custom" object builder (autofac) can re-use registration of many types have done in common assembly. when run service, hosted within nservicebus.host.exe, following error:

serializationexception unhandled:

type 'autofac.core.registration.componentnotregisteredexception' in assembly 'autofac, version=3.0.0.0, culture=neutral, publickeytoken=17863af14b0044da' not marked serializable.

this seems odd me because nservicebus uses autofac default , doesn't have same issue.

i using autofac v 3.1.1 , nservicebus 4.0.3

it's true componentnotregisteredexception not marked serializable - portable class libraries don't support serializableattribute , autofac 3.0+ pcl.

i'm guessing larger issue you're running isn't serializationexception problem causing - in custom code isn't registered, when type getting resolved can't built and, thus, autofac throws componentnotregisteredexception , nservicebus trying serialize it.

instead of trying solve serialization problem, i'd start looking @ source of componentnotregisteredexception , focus on that.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -