Skip to content

Single-file (file-based) apps: taskbar icon drawn on accent plate and title bar icon missing #1077

Closed

Description

Summary

When a .NET file-based (single-file) WinUI app is run packaged through Microsoft.Windows.SDK.BuildTools.WinApp (dotnet run App.cs / winapp run App.cs), the app icon is wrong in two places compared to the same app built from a .csproj:

  1. Taskbar icon is drawn on an accent-colored plate instead of the clean unplated icon.
  2. The window title bar has no icon.

Found while testing the new reactor-singlefile template in microsoft/WindowsAppSDK#6844 side by side with the four existing Reactor .csproj templates.

Image Image

Repro

  • .NET SDK 10.0.401, Developer Mode on
  • Microsoft.Windows.SDK.BuildTools.WinApp 0.7.1, Microsoft.WindowsAppSDK 2.5.1, Microsoft.UI.Reactor 0.1.0-preview.16
dotnet new reactor-singlefile -n SingleFileDemo   # template pack from microsoft/WindowsAppSDK#6844
cd SingleFileDemo
dotnet run SingleFileDemo.cs

Compare with dotnet new reactor -n BlankDemo; cd BlankDemo; dotnet run.

Findings

1. Taskbar plate: the generated assets aren't indexed in resources.pri

winapp synthesizes the manifest (Square44x44Logo="Assets\AppList.png", BackgroundColor="transparent") and writes the assets to %TEMP%\dotnet\runfile\<app>-<hash>\bin\debug\AppX\Assets\, including AppList.targetsize-24_altform-unplated.png. But the resources.pri generated next to it doesn't index any of the Assets\AppList* files: there are no TARGETSIZE or ALTFORM qualifiers in it at all.

Because the shell can't resolve an unplated targetsize variant through MRT, it falls back to the plated logo and draws it on a plate in the user's accent color (BackgroundColor="transparent" means accent).

For comparison, the .csproj app's resources.pri indexes Square44x44Logo.png, .scale-200, .targetsize-24_altform-unplated and .targetsize-48_altform-lightunplated, and its taskbar icon is unplated.

Also worth checking: only a targetsize-24 unplated variant is generated for the single-file path. The taskbar at higher DPI, and light theme, look for other sizes (e.g. 32/48) and altform-lightunplated.

2. Title bar: the exe has no embedded icon

The WinUI title bar icon comes from the exe's embedded Win32 icon resource. .csproj templates set <ApplicationIcon>Assets\AppIcon.ico</ApplicationIcon>. A file-based app has no .ico and no ApplicationIcon, so the apphost exe has no icon and the title bar is empty. winapp already produces an app.ico in manifest update-assets, but the single-file run path doesn't generate one or set ApplicationIcon.

Expected

A single-file app run through winapp should look the same as the .csproj equivalent:

  • unplated taskbar icon, with generated assets indexed in resources.pri across the usual targetsize and altform-unplated/lightunplated variants
  • a title bar icon, from a generated default .ico wired up as ApplicationIcon when the user hasn't set one

The template can't fix this on its own without adding files next to the .cs, which defeats the purpose of a single-file template.

Pointers

Activity

  1. added a commit that references this issue on Oct 14, 2026
    c3b3027
  2. added a commit that references this issue on Oct 20, 2026
    f73b6df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions