Skip to content

[WebToolsE2E][Aspire] For a Function App with Aspire 9.2, the port number in console logs is always 7071 and does not match the port number in the dashboard #8589

@balachir

Description

@balachir

REGRESSION INFO

Worked in Aspire 9.1.0

INSTALL STEPS

  1. Clean machine: Win11 x64 24h2 ENU
  2. Install VS 17.13 (latest released version)
  3. Install Aspire.ProjectTemplates 9.1.0
  4. Install Aspire.ProjectTemplates 9.2.0

MINIMAL REPRO

REPRO STEPS

  1. New Function App > enable Aspire > choose Aspire 9.2 > FunctionApp10
  2. Check FunctionApp10.AppHost.csproj to use Aspire 9.2
    <PackageReference Include="Aspire.Hosting.AppHost" Version="9.2.0" />
    <PackageReference Include="Aspire.Hosting.Azure.Functions" Version="9.2.0-preview.1.25206.1" />
  1. Open FunctionApp10.AppHost\Program.cs and Ctrl + F5 (run without debugging)

ACTUAL
Port number in console logs is 7071 but the one shown in the dashboard is 7045

Image

Image

EXPECTED

Port number in console logs should match with the one in the dashboard -- both should be 7045

DETAILED REPRO (if you want to compare behavior with Aspire 9.1)

REPRO STEPS

With Aspire 9.1

  1. New Function App > enable Aspire > choose Aspire 9.1 > FunctionApp9
  2. Make sure that FunctionApp9.AppHost.csproj points to Aspire 9.1
    <PackageReference Include="Aspire.Hosting.AppHost" Version="9.1.0" />
    <PackageReference Include="Aspire.Hosting.Azure.Functions" Version="9.1.0-preview.*" />
  1. The launchSettings.json of FunctionApp9 is configured to use port 7086

Image

  1. Open FunctionApp9.AppHost\Program.cs and Ctrl + F5 (run without debugging)
  2. Works fine - Aspire dashboard, console logs shows the localhost:7086 and the page loads successfully

Image

Image

Image

With Aspire 9.2

  1. Update FunctionApp9.AppHost.csproj to use Aspire 9.2
    <PackageReference Include="Aspire.Hosting.AppHost" Version="9.2.0" />
    <PackageReference Include="Aspire.Hosting.Azure.Functions" Version="9.2.0-preview.*" />
  1. Open FunctionApp9.AppHost\Program.cs and Ctrl + F5 (run without debugging)

ACTUAL
The URL (port number) shown in the Aspire dashboard does not match the port number used in the console logs

Image

Image

Image

EXPECTED
The same port number should show up in the console logs as the dashboard URL. The page should load successfully as we saw with the Aspire 9.1 case above.

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesazure-functionsIssues related to the Azure Functions integrationregression-from-last-releaseThis used to work in an earlier version of Aspire and we broke it!

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions