From c798f74056a4e8a8af3a870f23b5445068aa37b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Sat, 4 Jun 2022 11:20:59 -0400 Subject: [PATCH] Fix native library loading for osx-arm64 (#17365) --- .../CoreCLR/CorePsAssemblyLoadContext.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs b/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs index fad311df98..c87815d15d 100644 --- a/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs +++ b/src/System.Management.Automation/CoreCLR/CorePsAssemblyLoadContext.cs @@ -232,6 +232,9 @@ namespace System.Management.Automation /// | /// |--- 'osx-x64' subfolder /// | |--- native.dylib + /// | + /// |--- 'osx-arm64' subfolder + /// | |--- native.dylib /// internal static IntPtr NativeDllHandler(Assembly assembly, string libraryName) { @@ -552,7 +555,7 @@ namespace System.Management.Automation } else if (Platform.IsMacOS) { - folderName = "osx-x64"; + folderName = "osx-" + processArch; ext = ".dylib"; }