dotnet / dotnet/project-system

[WebToolsE2E][Aspire] Updated Aspire version from Aspire 9.1 to 9.2. When running the project, an exception occurred: System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.ServiceDiscovery, Version=9.2.0.0,'.

Open
#9,647 2 comments 0 reactions 1 assignee Claimed by @LittleLittleCloud View on GitHub
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

**INSTALL STEPS**
1. Clean machine: Win11 x64 23h2 ENU
2. Install VS 17.14 P3
- Web workload
3. Install Aspire 9.1.0
4. Install Aspire 9.2.0-preview.1.25152.3
- Apply aspire 9.2 Feed

**REPRO STEPS**
1. Open an existing 9.1.0 solutions (Aspire Starter Application), build and run - works
2. Right click Solution > Manage NuGet Packages for Solution > Update
3. Updated the versions of packages Aspire.Hosting.AppHost and Microsoft.Extensions.ServiceDiscovery to 9.2.0-preview.1.25152.3
4. Right click the solution > Build and F5

**NOTE:**
1. If you don't build and run in the first step, this issue will not be reproduced.
2. After updating the package, wait for all packages to be restored and build successfully, then press F5, and you will encounter this issue. However, Rebuild solution will not encounter this issue.
3. There is a similar known issue in Aspire 8.0 [#9489](https://github.com/dotnet/project-system/issues/9489).
4. Execute all REPRO STEPS in CMD. This issue is not reproduced.

**ACTUAL**
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Extensions.ServiceDiscovery, Version=9.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.'
![Image](https://github.com/user-attachments/assets/7b17b173-08b3-435e-9635-fe38352f4f95)

**EXPECTED**
Can run successfully.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.