Using NSB 4 with this configuration:

Configure.With()
    .DefaultBuilder()
    .XmlSerializer()

Gives this error warning

'NServiceBus.ConfigureXmlSerializer.XmlSerializer(NServiceBus.Configure, string, bool)' 
is obsolete: 'Please use 'Configure.Serialization.Xml()' instead. Will be treated as an 
error from version '5.0'. Will be removed in version '6.0'.'

How should Configure.Serialization.Xml() be used?

有帮助吗?

解决方案

Use Configure.Serialization.Xml() anywhere before the Configure.With()... block.

Or don't. XML is the default, so you don't need that block at all unless you want to use one of the overloads to set a specific setting.

These are new settings that are slowly taking the place of the fluent config with the goal of making the configuration order-agnostic and introducing sensible defaults so that self-hosting becomes a lot easier.

At some point in the future, you'll be able to use something like Configure.CreateBus() if you just want the defaults!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top