I was experiencing the same issue, same error message.
I then located this comment https://github.com/dotnet/sdk/issues/33718#issuecomment-1615229332 which states "ClickOnce publish is not supported with dotnet publish. You will need to use msbuild".
I had tried many variations of the MSBuild, and I was also trying to get this working in an Azure DevOps pipeline.
What I eventually got working on local CMD prompt is:
MSBuild myproject.csproj /target:publish /p:PublishProfile=ClickOnceProfile
This resulted in the PublishDir folder specified in my ClickOnceProfile.pubxml containing the expected files, which is the setup.exe file, Application Manifest, Launcher.exe and an Application Files folder.