'Is a UWP packaging project for a WPF application "SelfContained"?

I have a .NET6 WPF app and am packaging it with a UWP packaging project. In the past this has worked fine. Now I get an error:

It is not supported to build or publish a self-contained application without specifying a RuntimeIdentifier. You must either specify a RuntimeIdentifier or set SelfContained to false.

So which one do I need to do (and where?)? Is a normal WPF app considered SelfContained, or should I just set that to false? (And how would I go about doing that?)

I do not want to run any command line options since those should not be needed. And notice this is a simple WPF application, and according to this Microsoft walkthrough no additional steps should be needed.



Solution 1:[1]

A self-contained .NET (Core or 5+) app of any kind always produces a platform-specific executable so you must specify a valid runtime identifier when you build one. This has nothing to do with MSIX or UWP.

A "normal", i.e. created using the built-in template in Visual Studio, WPF app is not self-contained but framework-dependent. This basically means that a user of your app is required to install the .NET runtime before they can run the app. This is usually not an issue for apps that run (only) on Windows, such as for example WPF apps.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mm8