Skip to content

[WebToolsE2E][Aspire] Running with new Azure Function + Aspire, the error appears: "Application Insights SDK has not been added. Please add and configure the Application Insights SDK..." #6452

@v-bennettyue

Description

@v-bennettyue

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install Dev17.12 GA
  3. Install Aspire 9.0 GA
  4. Apply feed

REPRO STEPS

  1. New > Azure Function > .NET 9.0 Isolated (Preview) > Select "Http trigger" as Function, click "Enlist in Aspire orchestration" > Create
  2. Build and run

Note:

  1. This is the new Azure Functions, the contents of Program.cs file are as follows
    Image
  2. The AzureFunctionsTools version as follow:
    Image
  3. When I run the Azure Function alone, it succeeds

ACTUAL:
An error will occur:
Microsoft.Extensions.Options.OptionsValidationException: 'Application Insights SDK has not been added. Please add and configure the Application Insights SDK. See https://learn.microsoft.com/en-us/azure/azure-monitor/app/worker-service for more information.'
Image

EXPECTED
Run successfully

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesazure-functionsIssues related to the Azure Functions integrationexternalIssues that represent work that's external to this repo.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions