From 8f27aee11a363e172303f70fd82d17dac9b886ca Mon Sep 17 00:00:00 2001 From: Gregor Klevze Date: Thu, 13 Aug 2026 16:01:20 +0200 Subject: [PATCH] Fix title bar icon missing in single-file published builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The title bar Image used Source="ms-appx:///Assets/Square44x44Logo.scale-200.png". That resolves fine in a normal build (Assets/ and AmiReel.pri sit next to the exe), but a single-file self-contained publish (IncludeAllContentForSelfExtract=true) bundles Content items into the exe in a way ms-appx:// can no longer resolve at runtime, leaving the title bar icon blank — reproduced with the actual publish-win-x64.ps1 output, confirmed fixed the same way. Load the icon from a plain embedded resource instead (same mechanism already used for ffmpeg.exe/ffprobe.exe): the PNG is embedded via , and MainWindow loads it at startup via GetManifestResourceStream + BitmapImage. SetSourceAsync. This bypasses the ms-appx/MRT resource pipeline entirely, so it behaves identically in dotnet build, dotnet run, and a single-file publish. Co-Authored-By: Claude Sonnet 5 --- AmiReel.csproj | 5 +++++ MainWindow.xaml | 2 +- MainWindow.xaml.cs | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/AmiReel.csproj b/AmiReel.csproj index 43c76f4..78d3d0b 100644 --- a/AmiReel.csproj +++ b/AmiReel.csproj @@ -46,6 +46,11 @@ + +