Where does ClickOnce 'Application Files' list come from?

63 Views Asked by At

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:

The Application Files dialog is VS2022

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.

1

There are 1 best solutions below

3
Minxin Yu - MSFT On

Specify which files are published by ClickOnce

When publishing a ClickOnce application, all non-code files in the project are deployed along with the application.

Files with the Build Action property set to Content are designated as application files and will be marked as included by default