This was a case of a mix up on folder structure on my part and for some reason had the .env file is to folders.
How to solve Azure Key Vault endpoint is not set on Local Visual Studio code
Onyango, David
21
Reputation points
I am following the steps outlined in https://github.com/Azure-Samples/azure-search-openai-demo-csharp to deploy ChatGPT and azure search. When running the following command to start on a local client host, I get the error below it.
dotnet run --project ./app/backend/MinimalApi.csproj --urls=http://localhost:7181/
Unhandled exception. System.InvalidOperationException: Azure Key Vault endpoint is not set. at MinimalApi.Extensions.KeyVaultConfigurationBuilderExtensions.ConfigureAzureKeyVault(IConfigurationBuilder builder)
The
AZURE_KEY_VAULT_ENDPOINT
C#