When generating an msix for a project that uses the <TargetFrameworks> attribute instead of the <TargetFramework> attribute this error is given. I guess the MSIX Packaging project template is not compatible with this newer attribute?
My project was targeting net5.0-windows only but had previously also targetted net48. Once I found the cause it was easy to reproduce, and it also happens for projects that have this attribute and do use multi-targetting, so targetting net5.0-windows;net48 will not work either. You have to use the <TargetFramework> attribute instead.
Is this by design, a choice or is this supposed to work with the <TargetFrameworks> attribute as well.