Deploying a project: missing files


Aug 21, 2023
Programming Experience
VB 2022 17.7.1
.NET Framework 4.7.2
Windows Forms Application
Release/Any CPU

I finished a project, created the executable, tested and tried it for a while. Everything seems OK, but during the ftp publishing procedure, several errors popped up that previously did not exist.

Here are some of them:

the file 'bin\Release\System.Security.Principal.Windows.xml' was not found.
the file 'bin\Release\NAudio.Core.xml' was not found.
the file 'bin\Release\runtimes\win-arm64\native\WebView2Loader.dll' was not found.
the file 'bin\Release\Affari Nostri.exe.WebView2\EBWebView\Default\Service Worker\CacheStorage\379f1cbab5b08b6fc9e08681e42d8be311441c88\index.txt' was not found.
the file 'bin\Debug\Microsoft.Web.WebView2.Wpf.xml' was not found.

44 other error messages follow, many of them related to .xml files, but not only. (Need a complete list?)
I started to manually bring in, according to the error messages, the requested files and related messages disappear, but is this the correct procedure?

Can I ask for help in understanding what happened and how to take action to complete the publishing procedure correctly?
Thank you.
In addition to the previous information:
I reiterate that after the ftp guided publishing attempt, it is no longer possible to start the program from Visual Studio.
I went back to the last backup in order to get the project started again. I found some messages in Debug Output. Some of them do not look suspicious to me; there are two that I am reporting, I think they may be helpful.

(CLR v4.0.30319: Affari Nostri.exe): loading 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Deployment.resources\v4.0_4.0.0_en_b03f5f7f11d50a3a\System.Deployment.resources.dll' completed. Module compiled without symbols.

Exception generated: 'System.Deployment.Application.InvalidDeploymentException' in System.Deployment.dll.

'Affari Nostri.exe' (CLR v4.0.30319: Affari Nostri.exe): loading 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\mscorlib.resources\v4.0_4.0.0.0_en_b77a5c561934e089\mscorlib.resources.dll' completed. Completed form without symbols.

The program '[11040] Affari Nostri.exe' is terminated with code 0 (0x0).

Even under these conditions, the program is correctly running and the deployment file (setup.exe and Affari Nostri. msi) is buildable, which works smoothly and allows the program to be installed even on a different pc.
The problem (visible, evidently other hidden bugs are present) is that it is impossible to publish with the wizard.
Thanks to those who would like to use some time.