SQL Persistence Upgrade Version 4 to 5

Component: Sql Persistence

Move to .NET 4.6.1

The minimum .NET Framework version for version 5 is .NET 4.6.1.

All projects must be updated to .NET Framework 4.6.1 before upgrading to version 5.

It is recommended to update to .NET Framework 4.6.1 and perform a full migration to production before updating to version 5. This will help isolate any issues that may occur.

For solutions with many projects, the Target Framework Migrator Visual Studio extension can reduce the manual effort required in performing an upgrade.

Microsoft.Data.SqlClient compatibility

In order to add support for Microsoft.Data.SqlClient, the persister no longer references System.Data.SqlClient. The persister is compatible with both clients, but a package reference to System.Data.SqlClient or Microsoft.Data.SqlClient will need to be added to any projects using the persister.

System.Data.SqlClient is in maintenance mode. Microsoft will be bringing new features and improvements to Microsoft.Data.SqlClient only. For more information, read Introduction to the new Microsoft.Data.SqlClient. It is recommended to switch to the new client if possible.

Compatibility with NServiceBus.SqlServer and NServiceBus.Transport.SqlServer

Regardless of the client used, the persister is compatible with NServiceBus.SqlServer and NServiceBus.Transport.SqlServer. It is recommended to use the same client in the transport as well as the persister. When gradually migrating from System.Data.SqlClient to Microsoft.Data.SqlClient, the transport and the persister can operate in a mixed mode as long as the transport transaction mode is either ReceiveOnly or SendsWithAtomicReceive. If the transport operates with transport transaction mode, TransactionScope, using both clients will lead to DTC escalation in all cases, which might not be desirable.

Last modified