dotnet / dotnet/sdk

.NET 10 SDK requires specific apphost pack (8.0.27) and fails when only newer runtime (8.0.28) is installed

Open
#54,935 1 comment 0 reactions 0 assignees View on GitHub
untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

We are seeing build failures after an automatic update of .NET SDKs on our build agents.
```
##[error]C:\Program Files\dotnet\sdk\10.0.204\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(190,5): Error NETSDK1145: The Apphost pack is not installed and NuGet package restore is not supported. Upgrade Visual Studio, remove global.json if it specifies a certain SDK version, and uninstall the newer SDK. For more options visit https://aka.ms/targeting-apphost-pack-missing Pack Type:Apphost, Pack directory: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Host.win-x64, targetframework: net8.0, Pack PackageId: Microsoft.NETCore.App.Host.win-x64, Pack Package Version: 8.0.27
```

Our projects target:
```net8.0```

Our build agents recently updated to:
```
.NET 8 SDK 8.0.422 (includes runtime 8.0.28)
.NET 10 SDK 10.0.204 (20x not available in June update)
```
We currently use Visual Studio Build Tools 18.2

**Observations**
On the build agent:
```
Runtime 8.0.27 is installed
Runtime 8.0.28 is installed
AppHost pack 8.0.28 is installed
AppHost pack 8.0.27 is NOT installed
```
So the system has a newer runtime available, but the SDK still requires the exact older patch version (8.0.27).

Key issue
SDK 10.0.204 appears to be hard-coded to require apphost pack 8.0.27, even when:

- A newer runtime (8.0.28) is installed
- A newer apphost pack (8.0.28) is installed

The .NET 10 SDK does not roll forward to a newer patch version for .NET 8 projects.

Is it expected that SDK 10 requires an exact apphost pack version and does not roll forward to newer patches?
How are we supposed to maintain an environment where our .NET 8 projects use the .NET 10 SDK, but the .NET 10 SDK does not come with the required AppHost packs for .NET 8?

What is the recommended configuration for this combination?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Microsoft.NET.Sdk.FrameworkReferenceResolution.targets at line 190 and reproduce the failure using the listed .NET 8 and .NET 10 SDK, runtime, and apphost pack versions. Determine whether exact apphost patch matching is expected and identify the documented or code-level configuration that resolves the net8.0 build; the issue is complete when the expected behavior and recommended setup are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.