On a beautiful day, after install new .net sdk, you suddenly can not start Aspire. The error is:
Hosting failed to start
System.IO.FileNotFoundException: The Aspire orchestration component is not installed at "C:\Program Files\dotnet\packs\Aspire.Hosting.Orchestration.win-x64\8.1.0\tools\dcp.exe". The application cannot be run without it.
Look into the folder "C:\Program Files\dotnet\packs", the "8.1.0" folder does not exist. Not sure if .net installing process is removed "8.1.0" package.
So we have to reinstall "8.1.0" package at this folder.
Step 1: open Cmd by adminstrator right
Step 2: Navigate to Aspire host project
Step 3: Run this command to install 8.1.0 package to the folder "C:\Program Files\dotnet\packs":
dotnet add package Aspire.Hosting.Orchestration.win-x64 -v 8.1.0 --package-directory "C:\Program Files\dotnet\packs"
Step 4: Close visual studio, close browser
Step 5: Open Visual Studio, and clean the solution
Step 6: Run the project and enjoy