microsoft / microsoft/aspire

`aspire update` doesn't fully upgrade sdk

Open
#11,458 3 comments 0 reactions 0 assignees View on GitHub
area-cli
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

I ran `aspire update` on my project (and after working around #11453), I get build warnings when I try to `dotnet build` my project

```
S:\REDACTED.Aspire\src\REDACTED.Aspire.AppHost\REDACTED.Aspire.AppHost.csproj : warning MSB4240: Multiple versions of the same SDK "Aspire.AppHost.Sdk" cannot be specified. The previous
ly resolved SDK version "9.4.0" from location "S:\REDACTED.Aspire\src\REDACTED.Aspire.AppHost.Tests\REDACTED.Aspire.AppHost.Tests.csproj" will be used and the version "9.5.0-preview.1.2
5466.3" will be ignored.
```

### Expected Behavior

_No response_

### Steps To Reproduce

It think this is caused by having multiple AppHosts (or in my case an AppHost and a test project) in the same solution. `aspire update` only updated the sdk for one project, but now msbuild gets very unhappy that there are conflicting versions across the solution.

### Exceptions (if any)

_No response_

### .NET Version info

9.5.0-preview.1.25466.3+4304e9ce74ab0a02ebabb643e9c32195c1f14b16
```
.NET SDK:
Version: 8.0.414
Commit: 62977d44a9
Workload version: 8.0.400-manifests.a964dcb3
MSBuild version: 17.11.41+18f1ecf82

Runtime Environment:
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.414\

.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.

Host:
Version: 10.0.0-preview.7.25380.108
Architecture: x64
Commit: 30000d883e

.NET SDKs installed:
8.0.414 [C:\Program Files\dotnet\sdk]
9.0.304 [C:\Program Files\dotnet\sdk]
10.0.100-preview.7.25380.108 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-preview.7.25380.108 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-preview.7.25380.108 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0-preview.7.25380.108 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set
```

### Anything else?

_No response_

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.