I am trying to publish an event which is defined as an interface:
Bus.Publish<IAccountCreated>(m => { m.Key = Guid.NewGuid(); });
When using the JSON serializer, it gives me the error:
Could not find a concrete type mapped to Contracts.IAccountCreated
It works fine with the XML serializer.
My endpoint configuration:
Configure.With()
.DefaultBuilder()
.JsonSerializer() <-- when this is here I get the error.
.DefiningCommandsAs(t => t.Namespace != null && t.Namespace.StartsWith("Website"))
.DefiningEventsAs(t => t.Namespace != null && t.Namespace.Contains("Contracts"))
I'm using NServiceBus 3.3.3.