INSTALL STEPS
- Clean machine: Win11 x64 23h2
- Install VS 17.13 GA
- Apply dotnet9 Feed
REPRO STEPS
- Create a new project > Azure Functions > Next > .NET 8.0 lsolated (Long Term Support) > check "Enlist in .NET Aspire orchestration (Preview)" > Create
- Open xxx.AppHost.csproj file, the
Aspire.Hosting.Azure.Functions package automatically downloaded the latest 9.1 from the feed

- 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.

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
-
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".
-
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.

INSTALL STEPS
REPRO STEPS
Aspire.Hosting.Azure.Functionspackage automatically downloaded the latest 9.1 from the feedACTUAL

The run fails with error: Newer version of .NET Aspire workload is required to run the application. Run 'dotnet workload update' to get it.
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](IEnumerable
1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List1 exceptions, Func`3 operation)EXPECTED
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".
If you only add dotnet9 Feed without installing aspire 9.1.0, the package version of
Aspire.Hosting.Azure.Functionsshould be 9.0, not the latest version 9.1 from the feed.