You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NETSDK1145: 'The Apphost pack is not installed' error while building C++\CLI project (targeting .NET 5) with Visual Studio 2019 16.11.1 if Visual Studio 2022 17.0.0 Preview 3.1 is installed #20109
Hello.
I have C++\CLI project (targeting .NET 5) that was building correctly with latest Visual Studio 2019 16.11.1 yesterday.
Today I've installed Visual Studio 2022 17.0.0 Preview 3.1 (than includes .NET 6 preview 7). And today I cannot build my project:
C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkRefere
nceResolution.targets(127,5): 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-x86, targetframework: net5.0, Pack PackageId: Microsoft.NETCore.App.Host.win-x86, Pack Package Version: 5.0.8.
Strange thing is that now C:\Program Files\dotnet\sdk\6.0.100-preview.7.21379.14\Sdks\Microsoft.NET.Sdk is used to build my C++\CLI project (targeting .NET 5)..
In C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Host.win-x86 the following folders are present: