This is part of the NServiceBus Upgrade Guide from Version 8 to 9, which also includes the following individual upgrade guides for specific components:
Transports
- AmazonSQS Transport Upgrade Version 6 to 7
- Azure Service Bus Transport Upgrade Version 3 to 4
- SQL Server Transport Upgrade Version 7 to 8
Hosting
Other
Default serializer has changed
The default serializer has changed from Json.NET to System.Text.Json.
The Json.NET serializer can continue to be used by adding a package reference to the NServiceBus.
package and setting NewtonsoftJsonSerializer
as the serializer:
var host = new HostBuilder()
.ConfigureFunctionsWorkerDefaults()
.UseNServiceBus(configuration =>
{
configuration.AdvancedConfiguration.UseSerialization<NewtonsoftJsonSerializer>();
})
.Build();