Description
Describe the bug
With WindowsAppSDK 1.8 experimental 1, no issue occurs. However after upgrading to experimental 2, I get the following exception when starting my published single file self-contained unpackaged WinUI 3 app after renaming the published exe file to something else:
[XamlParseException] XAML parsing failed.
int IApplicationOverrides.Do_Abi_OnLaunched_0(thisPtr, args) >
void Application.Microsoft.UI.Xaml.IApplicationOverrides.OnLaunched(args) >
void App.OnLaunched(args) in App.xaml.cs:45 >
new Window() in Window.xaml.cs:46 >
void Window.InitializeComponent() in Window.g.i.cs:69 >
void Application.LoadComponent(component, resourceLocator, componentResourceLocation) >
void IApplicationStaticsMethods.LoadComponent(_obj, component, resourceLocator, componentResourceLocation) >
void ExceptionHelpers.ThrowExceptionForHR(hr)
Pardon the custom stacktrace format
Steps to reproduce the bug
- Publish an unpackaged WinUI 3 app with PublishSingleFile, WindowsAppSDKSelfContained, SelfContained, and PublishTrimmed
- Rename the resulting binary
- Observe error when initializing a Window (may need to reference a resource like an image in the xaml somewhere)
NuGet package version
WinUI 3 - Windows App SDK 1.8 Experimental 1: 1.8.250515001-experimental2
Windows version
Windows 11 (24H2): Build 26100