Article .NET Aspire Azure Cosmos DB component: map has no entry for key "SERVICE_BINDING_CDBKV_ENDPOINT" #4074
-
I was following article .NET Aspire Azure Cosmos DB component with a new .NET Aspire Starter Application template (Preview 6) in Visual Studio. When deploying the application I get the following error:
I've been stuck for a day and I can't figure out what this issue exactly is or how to solve it. My AppHost Program.cs: var builder = DistributedApplication.CreateBuilder(args);
var cosmosdb = builder.ExecutionContext.IsPublishMode
? builder.AddAzureCosmosDB("cdb")
: builder.AddConnectionString("cdb");
var apiService = builder.AddProject<Projects.AspireAppWithCosmos_ApiService>("apiservice")
.WithReference(cosmosdb);
builder.AddProject<Projects.AspireAppWithCosmos_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(apiService);
builder.Build().Run(); and the ApiService Program.cs: var builder = WebApplication.CreateBuilder(args);
// Add service defaults & Aspire components.
builder.AddServiceDefaults();
builder.AddAzureCosmosDBClient("cosmosdb");
... Full logs:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @Jeroen-VdB , this issue is fixed on azd daily build: https://github.com/Azure/azure-dev/blob/main/cli/installer/README.md#download-from-daily-builds. Can you please give a try? |
Beta Was this translation helpful? Give feedback.
Hi @Jeroen-VdB , this issue is fixed on azd daily build: https://github.com/Azure/azure-dev/blob/main/cli/installer/README.md#download-from-daily-builds. Can you please give a try?