NServiceBus is supported in .net6
According to the hosting docs and .net3.1 WebAPI-sample hosting can be done with
var host = Host.CreateDefaultBuilder()
.UseNServiceBus(context =>
{
var endpointConfiguration = new EndpointConfiguration("Samples.ASPNETCore.Sender");
var transport = endpointConfiguration.UseTransport<LearningTransport>();
transport.Routing().RouteToEndpoint(
assembly: typeof(MyMessage).Assembly,
destination: "Samples.ASPNETCore.Endpoint");
endpointConfiguration.SendOnly();
return endpointConfiguration;
})
.ConfigureWebHostDefaults(c => c.UseStartup<Startup>())
.Build();
Microsoft of course have a guide on how to migrate from 3.1 to 6
But my knowledge seem to fall short as I fail to convert and host NServiceBus correctly in .net6. Any suggestions would be much appreciated.