I have a WinUI 3 application written in C#. I want to setup a GitHub workflow to create a release with unpackaged app. Application, built using Visual Studio start normally when started from .exe file. But when I run app, built with dotnet build command, window is not showing up, but app is in Task Manager in Background Processes.
Here is part of main project's .csproj
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>App</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x64;ARM64</Platforms>
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
<UseRidGraph>true</UseRidGraph>
<EnableCoreMrtTooling Condition=" '$(BuildingInsideVisualStudio)' != 'true' ">false</EnableCoreMrtTooling>
<ApplicationIcon>Assets\Logo\Logo.ico</ApplicationIcon>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Version>0.0.0</Version>
<WindowsPackageType>None</WindowsPackageType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<EnableMsixTooling>true</EnableMsixTooling>
</PropertyGroup>
You can use following workflow, change options based on your needs. For more info see here https://github.com/ghost1372/Dotnet-Publish-Action