The publish is being done via docker.
DockerFile
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-nanoserver-1809 AS build
// restore
...
// build
..
// publish
RUN dotnet publish --no-build -c Release /p:PublishSingleFile=true -r win-x64 --self-contained true -o C:/dist
.csproj
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>Common\Images\favicon.ico</ApplicationIcon>
<StartupObject>Dtail.Platform.Launcher.App.App</StartupObject>
</PropertyGroup>
...
</Project>
Expected behavior:
Since the OutputType
is set to WinExe
, it should hide the console host (source)
Actual behavior:
The application is opening along with a console window