Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Upgrading message contracts from Version 7 to 8

Component: NServiceBus

NServiceBus version 8 does not support .NET Standard as a target framework. Therefore, message contract assemblies that target netstandard2.0 and reference NServiceBus must be updated. This guide shows possible approaches. General guidance is available in the sharing message contracts documentation.

Change to specific target Framework

If all endpoints share the same target framework (e.g., .NET Core 3.1), the message contracts assembly can be changed from targeting .NET Standard to the same target framework as the endpoint projects.

Multi-targeting

If endpoints sharing a common contracts assembly target different platforms and frameworks (e.g. both .NET Framework 4.8 and .NET Core 6.0), the target assembly can use multi-targeting by replacing the TargetFramwork element with the TargetFrameworks (note the plural) element in the .csproj settings:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <!-- Typically, it is sufficient to list the lowest version needed -->
    <TargetFrameworks>net48;net6.0</TargetFrameworks>
  </PropertyGroup>
</Project>

Get help

For further information and assistance, refer to the support channels.