NServiceBus/NServiceBus — Issue #140: Exception at startup if message has Generic<Nullable<Anything>> property
Author: kkozmic
Created: 2011-10-19 03:41:35+00:00
State: open

We added a new message that has a property of type Delta (where Delta<> is a trivial type with two values of type T) and as soon as we did it we noticed that NServiceBus at startup started failing with seemingly unrelated exception. The logs show the following:

2011-10-19 13:32:46,573 [1] INFO NServiceBus.Host [(null)] <(null)> - Going to
activate profile: NServiceBus.Lite, NServiceBus.Host, Version=2.6.0.1505, Cultur
e=neutral, PublicKeyToken=9fc386479f8a226c
2011-10-19 13:32:47,649 [1] FATAL NServiceBus.Host.Internal.GenericHost [(null)]
<(null)> - System.InvalidOperationException: No message serializer has been con
figured.
at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.CheckConfiguration()
at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.Start()
at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start(Action star
tupAction)
at NServiceBus.Unicast.UnicastBus.NServiceBus.IStartableBus.Start()
at NServiceBus.Host.Internal.GenericHost.Start()

Needless to say our serializer is indeed being configured quite properly as far as I can tell, and it all works happily if we remove the aforementioned property.

We did some experimenting and it works if we have Delta (non-nullable) Delta or any other non-nullable value type. Delta> fails however so the issue seems to be in general related to generic type closed over nullable value types.

I'm happy to provide any more data if you guys need it.

Cheers,
Krzysztof