Skip to content

[WebToolsE2E][Aspire] After installing Aspire 9.1, running a scaffolded Aspire 9.0 project failed and got some unreasonable error messages: Newer version of .NET Aspire workload is required to run the application. Run 'dotnet workload update' to get it. #7752

@v-sherryfan

Description

@v-sherryfan

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2
  2. Install SDK 9.0.200
  3. Install latest released Microsoft.dotnet-scaffold-aspire, version 9.0.1
  4. Install Aspire 9.1.0
    • Apply aspire 9.1 Feed
  5. Install Docker

REPRO STEPS

  1. Open CMD, create an Aspire Starter App following commands:
dotnet new aspire-starter --aspire-version 9.0 -o Aspire01
cd Aspire01
  1. Run dotnet scaffold in solution, according to wizard:
    • Pick a scaffolding category: Aspire
    • Pick a scaffolding command: Caching
    • Caching type: redis
    • Aspire App host project file: Aspire01.AppHost
    • Web or worker project file: Aspire01.Web
    • Include Prerelease packages: No
  2. Run dotnet run in Aspire01.AppHost project

ACTUAL
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 162
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 127
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__14_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)
Unhandled exception. System.AggregateException: One or more errors occurred. (Newer version of .NET Aspire workload is required to run the application. Run 'dotnet workload update' to get it.)

EXPECTED
It shouldn't show anything like "dotnet workload update".

This should be good, Newer version of the Aspire.Hosting. AppHost package is required to run the application. Ensure you are referencing at least version.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions