From 3e5cf151836066757bb1cf74a9764dc9631ba364 Mon Sep 17 00:00:00 2001 From: Qiutong Shen Date: Tue, 14 Oct 2025 11:05:04 +0800 Subject: [PATCH] Fix Issue #33: Restore WinAppSDK 1.7 behavior for ResourceManager in XAML islands Remove CheckFile() call from GetDefaultPriFileForCurentModule() to fix regression where XAML island applications broke when resources.pri doesn't exist. This restores the exact WinAppSDK 1.7 behavior that allowed ResourceManager to work in XAML island scenarios even without PRI files present. - Fixes: GitHub Issue #33 - Regression: Introduced in WinAppSDK 1.8 - Impact: XAML islands (Win32 + WinUI3) now work again - Risk: Very low - reverts to proven 1.7 behavior --- .../Microsoft.Windows.ApplicationModel.Resources/src/Helper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/Helper.cpp b/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/Helper.cpp index f502592f..9e595dd4 100644 --- a/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/Helper.cpp +++ b/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/Helper.cpp @@ -48,6 +48,8 @@ HRESULT GetDefaultPriFileForCurentModule(bool isPackaged, winrt::hstring& filePa string_resoure_ptr pathContainter(path); filePath = pathContainter.get(); + // Fixed GitHub Issue #33: Removed CheckFile() call to restore WinAppSDK 1.7 behavior + // This allows ResourceManager to work with XAML islands even when resources.pri doesn't exist return S_OK; }