How to solve Azure Key Vault endpoint is not set on Local Visual Studio code

Onyango, David 21 Reputation points
2024-08-27T20:44:49.71+00:00

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#
Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,313 questions
Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,061 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Onyango, David 21 Reputation points
    2024-08-28T21:44:34.9733333+00:00

    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.