Upgrade Azure Storage Emulator on D365FO OneBox Without Losing Your Files

Upgrade Azure Storage Emulator on D365FO OneBox without losing your files

Microsoft Azure Storage Emulator is a tool that emulates Azure Blob, Queue, and Table services for local development purposes. You can test your application against the storage services locally without creating an Azure subscription or incurring any costs. When you’re satisfied with how your application works in the emulator, you can switch to the real one using an Azure storage account in the cloud. For more information on how to use Microsoft Azure Storage Emulator, click here.

Microsoft has deprecated Azure Storage Emulator. The new version of the emulator is now called Azurite, which now provides cross-platform support on Windows, Linux, and macOS. Azurite supersedes the Azure Storage Emulator, and it will continue to be updated to support the latest versions of Azure Storage APIs.

Default installation path

By default Azure Storage Emulator is installed here:
c:\Program Files (x86)\MicrosoftSDKs\Azure\Storage Emulator

How to check which version of Azure Storage Emulator you are using

In the command prompt, run the following command:
c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe

Version history and what’s used in D365FO

You can check what has changed in Azure Storage Emulator here. D365 throughout its life cycle for the past few years, used the following versions of Azure Storage Emulator 4.0.0.0, 5.7.0.0, 5.10.0.0. We made a backup of the mentioned versions, which can be downloaded here.

How does D365FO OneBox machine run Azure Storage Emulator?

Azure Storage Emulator is not designed to run as a Windows Service. Therefore, it is started with Microsoft Schedule Tasks at system start-up on the D365FO OneBox machine so that it is always available. For more details on how it’s being started, see the Task Scheduler Library by searching for the DynamicsStartAzureStorageEmulator task.

How to upgrade Azure Storage Emulator in D365FO developer OneBox machine?

NOTE: EACH VERSION OF AZURE STORAGE EMULATOR CREATES ITS OWN LOCAL STORAGE DATABASE AND AFTER THE UPGRADE YOUR EXISTING DATA WILL BE LOST.

The easiest way to upgrade Azure Storage Emulator is to download the latest setup file here. You can also upgrade the emulator manually by copying the right version files from here to the local machine folder c:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator.

Steps to update:

  1. Stop the process AzureStorageEmulator.exe in Windows Task Manager.
  2. Backup the database file pairs (see the next chapter) by copying the files to your preferred backup location.
  3. Update the Azure Storage Emulator.
  4. Restore the database file pairs by copying them back and renaming the files to have the same version as the currently installed Azure Storage Emulator (see the next chapter).
  5. Restart your computer.

Get back the data from the previous version of Azure Storage Emulator in D365FO

The Azure Storage Emulator process runs under the Windows System Account. It uses Microsoft SQL Server Local DB to store data by default and the database files are located here: c:\Windows\System32\config\systemprofile. Each version creates its own database file pairs (database and log file). Depending on the version of Azure Storage Emulator installed, you can find the following files in the default database path:

  • Version 5.10: AzureStorageEmulatorDb510.mdf and AzureStorageEmulatorDb510.log
  • Version 5.7: AzureStorageEmulatorDb57.mdf and AzureStorageEmulatorDb57.log

When you upgrade Azure Storage Emulator, you can copy the old database files to the same location and rename them to match the version of Azure Storage Emulator currently installed.

NOTE: If you forgot to backup the previous files, don’t worry because the new version will create a new database on the first run.

Leave a Reply

Your email address will not be published.

*

Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>