Support multiple storage accounts in Azure Storage Emulator
The Azure Storage Emulator only supports a single fixed account (devstoreaccount1).
This makes integration testing and development on the same machine a pain, as we would like to be able to clear the integration testing account entirely before and after each test sequence, without removing development data.
The connection string to the new account could use the extended syntax (see https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator#authenticating-requests-against-the-storage-emulator - not "UseDevelopmentStorage=true"), with the same account key but a different account name, and if need be, different ports for blob/table/queue endpoints.
Thank you for your feedback. Providing this functionality is on our backlog but there is no ETA we can share at this time. We have logged this request in the GitHub repository for the new open source storage emulator, Azurite. Please continue the discussion there: https://github.com/Azure/Azurite/issues/40. We will provide updates when they become available on this ask as well as in the GitHub repository. For any further questions, or to discuss your specific scenario, send us an email at firstname.lastname@example.org.
Edwin Huber commented
You can currently do this using Azurite (https://github.com/Azure/Azurite)
You just need to start it pointing to different local paths and TCP ports.
We are still working on achieving feature parity with Azure Storage, but it covers most of the essentials for blob storage already.
Alexander Tulloh commented
It's a little hacky, but until this is ever implemented, I was able to manually add multiple storage accounts to the emulator.
Through the SQL Server Object Explorer, I connected to the SQL database that lies underneath the emulator and added a custom record for dbo.Account, reusing the existing development keys (see https://imgur.com/a/EDJPc)
I then was able to use the extended sytax to connect as Maxime Rossini suggested, with a connection string like: