Packaged .Net Core app that uses XAML Host not building? It's a known issue - here's how to fix it.
The XAML Host is a powerful control that allows you to easily use UWP and WinUI 2 controls in a non-UWP application using the XAML Islands feature introduced in Windows 10 1903. Many Microsoft applications use XAML Islands, such as Notepad, Paint, Windows Terminal, the Windows Taskbar, Magnifier, File Explorer and more. Many of our applications using XAML Islands as well such as Codly, LaserCursor, KeepOn, QPad and more. The advantage of XAML Islands, is that you can use modern controls in a non-UWP application, allowing for various things such as better touch support and dark mode support. The XAML Host control makes using XAML Islands in .Net Core and .Net Framework applications easy. Unfortunately, there's an issue with newer versions of Visual Studio 2019 and all versions of Visual Studio 2022 that can prevent packaged applications that use the XAML Host not to build.
About the issue
Downgrading Visual Studio
Where to download old versions of Visual Studio 2019
Once you cancel that, select the 'Available' tab:
Help get this fixed