I'm working in Visual Studio 2022 version 17.8.6 on a C#/WPF project targeting .NET 6. In Solution Explorer I right-click my startup project and click 'Publish...' then 'Show all' to edit my existing publish profile. On the 'Settings' page I can open the 'Application Files' dialog which looks like this:
My question is, how is that list of files generated?
Not by scanning the build output directory, since the above screenshot is from a completely cleaned solution tree which hasn't been built yet. Even after a build, this dialog is missing files, including some which are dynamically generated during the build and at least one which is explicitly mentioned in a <Content> tag in my .csproj.
In case it might be relevant, I experience two issues with this dialog. Firstly the file extensions are missing in most cases. But more importantly, files which are generated during my build and are present in the build output directory are missing from this list, and subsequently missing from the ClickOnce deployment manifest. It seems like I need to understand the origin of this list to make progress.

Specify which files are published by ClickOnce