I have a similar issue as here, but this is running Azurite on windows with VS against an Azure Function.
I am trying to follow this documentation
Azurite is being initiated by VS through this setting in local.settings.json in the Azure Functions project:
"AzureWebJobsStorage": "UseDevelopmentStorage=true"
I have set the environment variables (also tried without quotation marks):
My connection string is like this:
"DefaultEndpointsProtocol=http;AccountName=imageaccount;AccountKey=SU1BR0VfQkxPQl9TVE9SQUdFX1VSTA==;BlobEndpoint=http://127.0.0.1:10000/imageaccount;"
My BlobContainerClient seems set up to go:
but calling
await containerClient.CreateIfNotExistsAsync();
throws an exception telling me it is an "Invalid storage account"?
Further info:
- per 26/06 - 2023
- Latest version of VS 17.6.4
- Azurite version installed by VS: 3.22.0 (Latest version is 3.24.0 ?)
Disabling Azurite startup in VS and running azurite from the console produces another exception with this message:
"The API version 2022-11-02 is not supported by Azurite. Please upgrade Azurite to latest version and retry. If you are using Azurite in Visual Studio, please check you have installed latest Visual Studio patch. Azurite command line parameter "--skipApiVersionCheck" or Visual Studio Code configuration "Skip Api Version Check" can skip this error. "
Running from console with the proposed --skipApiVersionCheck I am back to the original exception.
Setting up without the AZURITE_ACCOUNTS environment setting, and with "UseDevelopmentStorage=true" as connection string works
Any clues? Thx..