I\'m trying to publish a WPF Application (to a folder) targeting .NET Core 3.1, using Publish Single File, targeting win-x86. The application publishes fine for Debug, but fails
I had the same problem with a WPF application :
VS2019 16.3 and dotnet Core 3.0 - publish worked fine.
Updated to VS2019 16.4.1 and dotnet Core 3.1 - publish failed as described.
Only difference is I am targeting X64.
After multiple attempts editing the publish FolderProfile (none of which fixed the problem), I deleted the FolderProfile completely and created a new one targeting a different folder.
Publish works again.
Hope this helps.