[WebToolsE2E] Using VS Code C# Dev Kit, when we add Aspire orchestration to function app, it missed adding the function app project to the IDistributedApplicationBuilder and the package 'Aspire.Hosting.Azure.Functions' was missing.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
**REGRESSION INFO**: Not a regression
**INSTALL STEPS**
1. Clean machine: Win11 x64 ENU
2. Install SDK 9.0.200 (latest-released-version)
3. Install Aspire templates 9.1 (latest-released-version)
- `dotnet new install Aspire.ProjectTemplates`
4. Install VS Code + C# Dev Kit extension (latest pre-release version 1.17.48)
5. Install the latest released Azure Functions Extension
**REPRO STEPS**
1. Using VS Code, select Azure Functions explorer > Create Function > .NET 9.0 Isolated > HTTP trigger > `FunctionApp1` > Select "Function" > Select "Open in current windows".
2. Go to Explorer tab, right-click solution node > Add .NET Aspire Orchestration > select `FunctionApp1` as the project to be orchestrated.
3. For the names of AppHost and ServiceDefaults projects, set the values to be `FunctionApp1.AppHost` and `FunctionApp1.ServiceDefaults`.
**ACTUAL**
Aspire orchestration support gets added but it is incomplete
1. In the Program.cs of `FunctionApp1.AppHost`, the critical line of adding the function app project to the IDistributedApplicationBuilder is missing. Without this line, the dashboard will be blank when we run the AppHost.

2. In the `FunctionApp1.AppHost.csproj` file, the package 'Aspire.Hosting.Azure.Functions' is missing

**EXPECTED**
Missing orchestration support code and function package should get properly added.
1. In the Program.cs of `FunctionApp1.AppHost`, we should add the function app project to the IDistributedApplicationBuilder as follows.

2. In the `FunctionApp1.AppHost.csproj` file, the package 'Aspire.Hosting.Azure.Functions' should be installed automatically.

Contributor guide
Assessment
This issue has not been assessed yet.