AI agents: use the documentation index at llms.txt to locate machine-readable pages. This section is indexed by https://docs.particular.net/persistence/llms.txt. The markdown version of this page is served as plain text. An MCP server at /mcp serves the same content via the search_docs and read_doc tools; it is read-only and needs no credentials. Markdown versions of documentation pages are available by appending .md to the page URL. Directory URLs use index.md. They are served as text/plain because some retrieval backends reject text/markdown.

Upgrade from NServiceBus Azure Version 6

This is part of the NServiceBus Upgrade Guide from Version 5 to 6, which also includes the following individual upgrade guides for specific components:

Feature Details
Transports
Persistence
Hosting
Other

Changing NuGet packages and namespaces

One of the most visible changes for this persister was moving it from the NServiceBus.Azure package to the NServiceBus.Persistence.AzureStorage package. This change in packaging has reset the version number to version 1.

Upgrading to the new package requires removing the NServiceBus.Azure NuGet package from the project and adding the NServiceBus.Persistence.AzureStorage NuGet package.

Once the packages have been changed, any use of the NServiceBus.Azure namespace must be replaced with NServiceBus.Persistence.AzureStorage.

New configuration API

In versions 6 and below, the Azure Storage Persistence was configured using XML configuration sections called AzureSubscriptionStorageConfig, AzureSagaPersisterConfig, and AzureTimeoutPersisterConfig. These XML configuration sections have been deprecated in favor of a more granular, code-based configuration API.

For example, the following XML:

<configSections>
  <section name="AzureSubscriptionStorageConfig"
           type="NServiceBus.Config.AzureSubscriptionStorageConfig, NServiceBus.Azure" />
  <section name="AzureSagaPersisterConfig"
           type="NServiceBus.Config.AzureSagaPersisterConfig, NServiceBus.Azure" />
  <section name="AzureTimeoutPersisterConfig"
           type="NServiceBus.Config.AzureTimeoutPersisterConfig, NServiceBus.Azure" />
</configSections>
<AzureSagaPersisterConfig ConnectionString="UseDevelopmentStorage=true" />
<AzureTimeoutPersisterConfig ConnectionString="UseDevelopmentStorage=true" />
<AzureSubscriptionStorageConfig ConnectionString="UseDevelopmentStorage=true" />

changes to this code configuration:

var persistence = endpointConfiguration.UsePersistence<AzureStoragePersistence>();
persistence.ConnectionString("connectionString");

The new configuration APIs are accessible through extension methods on the UsePersistence<AzureStoragePersistence, StorageType.Sagas>(), UsePersistence<AzureStoragePersistence, StorageType.Subscriptions>(), and UsePersistence<AzureStoragePersistence, StorageType.Timeouts>() extension points in the endpoint configuration. See Azure Storage Persistence Code Configuration for more details on code configuration API use.

Related errors:

  • An error occurred creating the configuration section handler for AzureSagaPersisterConfig: Could not load file or assembly 'NServiceBus.Azure' or one of its dependencies. The system cannot find the file specified.
  • An error occurred creating the configuration section handler for AzureSubscriptionStorageConfig: Could not load file or assembly 'NServiceBus.Azure' or one of its dependencies. The system cannot find the file specified.
  • An error occurred creating the configuration section handler for AzureTimeoutPersisterConfig: Could not load file or assembly 'NServiceBus.Azure' or one of its dependencies. The system cannot find the file specified.

Related Articles