From 063aef3059d750bf22a388210ba4e392f778085e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 May 2025 06:42:17 +0000 Subject: [PATCH 1/2] Initial plan for issue From 8ca0d6a08ea8243546e7a4164c1c6422f02a83b4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 May 2025 06:46:52 +0000 Subject: [PATCH 2/2] Add DefaultDllImportSearchPaths attribute to WindowsAppRuntime_EnsureIsLoaded method Co-authored-by: MuyuanMS <116717757+MuyuanMS@users.noreply.github.com> --- dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs b/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs index 2e07c542df..337a931016 100644 --- a/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs +++ b/dev/UndockedRegFreeWinRT/UndockedRegFreeWinRT-AutoInitializer.cs @@ -14,6 +14,7 @@ namespace Microsoft.Windows.Foundation.UndockedRegFreeWinRTCS { internal static class NativeMethods { + [DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)] [DllImport("Microsoft.WindowsAppRuntime.dll", CharSet = CharSet.Unicode, ExactSpelling = true)] internal static extern int WindowsAppRuntime_EnsureIsLoaded(); }