Skip to content

[WebToolsE2E][Aspire] Without installing aspire 9.1.0 and only adding dotnet9 feed, running an Azure Function with aspire project fails with error:"Newer version of .NET Aspire workload is required to run the application." #7484

@v-sherryfan

Description

@v-sherryfan

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2
  2. Install VS 17.13 GA
  3. Apply dotnet9 Feed

REPRO STEPS

  1. Create a new project > Azure Functions > Next > .NET 8.0 lsolated (Long Term Support) > check "Enlist in .NET Aspire orchestration (Preview)" > Create
  2. Open xxx.AppHost.csproj file, the Aspire.Hosting.Azure.Functions package automatically downloaded the latest 9.1 from the feed
    Image
  3. F5

ACTUAL
The run fails with error: Newer version of .NET Aspire workload is required to run the application. Run 'dotnet workload update' to get it.
Image
Error logs
fail: Microsoft.Extensions.Hosting.Internal.Host[11]
Hosting failed to start
Aspire.Hosting.DistributedApplicationException: Newer version of .NET Aspire workload is required to run the application. Run 'dotnet workload update' to get it.
at Aspire.Hosting.Dcp.DcpDependencyCheck.EnsureDcpVersion(DcpInfo dcpInfo) in //src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 160
at Aspire.Hosting.Dcp.DcpDependencyCheck.GetDcpInfoAsync(Boolean force, CancellationToken cancellationToken) in /
/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 105
at Aspire.Hosting.Dcp.DcpDependencyCheck.GetDcpInfoAsync(Boolean force, CancellationToken cancellationToken) in //src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:line 125
at Aspire.Hosting.Dcp.DcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken cancellationToken) in /
/src/Aspire.Hosting/Dcp/DcpHost.cs:line 64
at Aspire.Hosting.Dcp.DcpHost.StartAsync(CancellationToken cancellationToken) in //src/Aspire.Hosting/Dcp/DcpHost.cs:line 57
at Aspire.Hosting.Orchestrator.OrchestratorHostService.StartAsync(CancellationToken cancellationToken) in /
/src/Aspire.Hosting/Orchestrator/OrchestratorHostService.cs:line 39
at Microsoft.Extensions.Hosting.Internal.Host.b__15_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func`3 operation)

EXPECTED

  1. The error message should prompt the user something like: A newer version of the Aspire templates is required to run the application. You can get it by running "dotnet new install Aspire.ProjectTemplates::9.1.0 --force".

  2. If you only add dotnet9 Feed without installing aspire 9.1.0, the package version of Aspire.Hosting.Azure.Functions should be 9.0, not the latest version 9.1 from the feed.

Image

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packagesazure-functionsIssues related to the Azure Functions integration

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions