Description
I have a cross-platform console dotnet core 5.0 application, here's a relevant extract from the .csproj file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<ApplicationIcon>main48.ico</ApplicationIcon>
</PropertyGroup>
...
</Project>
When I publish it with dotnet publish on my laptop running Windows 10 x64, I get a foo.exe with the icon (yellow square).

When I publish it on the build machine running Ubuntu 18.04 LTS, the icon doesn't seem to be embedded correctly. When I download the published app from the build machine and open it in the Windows explorer, the icon is not there.

I am using the same source code, same project, but different platforms for the build.
I've also tried building the project on my laptop using VS Code with WSL Ubuntu 18.04 LTS. I observed the same outcome: binaries compiled on Ubuntu do not have an icon.
Affected commands:
dotnet build
dotnet publish
# Published as a single app or an app with separate dependencies
I expect that the icon gets embedded correctly during the build on Ubuntu, targeting Windows OS executables.
Configuration
- Which version of .NET is the code running on?
dotnet core 5.0
- What OS and version, and what distro if applicable?
Windows 10 x64, Ubuntu 18.04 LTS x64
- What is the architecture (x64, x86, ARM, ARM64)?
Application is compiled as Windows x86
- Do you know whether it is specific to that configuration?
Not sure
Regression?
Did not test in previous releases
Description
I have a cross-platform console dotnet core 5.0 application, here's a relevant extract from the .csproj file
When I publish it with
dotnet publishon my laptop running Windows 10 x64, I get afoo.exewith the icon (yellow square).When I publish it on the build machine running Ubuntu 18.04 LTS, the icon doesn't seem to be embedded correctly. When I download the published app from the build machine and open it in the Windows explorer, the icon is not there.
I am using the same source code, same project, but different platforms for the build.
I've also tried building the project on my laptop using VS Code with WSL Ubuntu 18.04 LTS. I observed the same outcome: binaries compiled on Ubuntu do not have an icon.
Affected commands:
I expect that the icon gets embedded correctly during the build on Ubuntu, targeting Windows OS executables.
Configuration
dotnet core 5.0
Windows 10 x64, Ubuntu 18.04 LTS x64
Application is compiled as Windows x86
Not sure
Regression?
Did not test in previous releases