-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Description
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.23 [D:\a\1\s\Source\Common\Ase.FeaturesCore\Ase.FeaturesCore.vcxproj]
NETSDK1145: Targeting or apphost pack missing - .NET CLI | Microsoft Learn
How to resolve the issue of targeting pack missing while NuGet package restore is not supported
Platforms affected
- Azure DevOps
- GitHub Actions - Standard Runners
- GitHub Actions - Larger Runners
Runner images affected
- Ubuntu 22.04
- Ubuntu 24.04
- Ubuntu Slim
- macOS 14
- macOS 14 Arm64
- macOS 15
- macOS 15 Arm64
- macOS 26
- macOS 26 Arm64
- Windows Server 2022
- Windows Server 2025
- Windows Server 2025 with Visual Studio 2026
Image version and build link
20260225.46.2
Is it regression?
20260217.39.1
Expected behavior
we can build C++/CLI projects.
Actual behavior
We cannot because apphost pack is missing for nuget restore
Repro steps
perform a build of a C++/CLI project that needs to restore nuget packages.