Skip to content

Commit 822fdac

Browse files
authored
fix: attempt to load using DYLIB FRAMEWORK PATH for NET8 and greater
1 parent 4dca326 commit 822fdac

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Yubico.Core/src/Yubico/PlatformInterop/macOS/Interop.Libraries.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ internal static partial class Libraries
2828
internal static readonly string IOKitFramework;
2929
internal static readonly string WinSCard;
3030

31+
#if NET8_0_OR_GREATER
3132
static Libraries()
3233
{
3334
string frameworkPath = Environment.GetEnvironmentVariable("DYLD_FRAMEWORK_PATH");
@@ -37,5 +38,13 @@ static Libraries()
3738
IOKitFramework = Path.Combine(basePath, IOKitFrameworkBasePath);
3839
WinSCard = Path.Combine(basePath, WinSCardBasePath);
3940
}
41+
#else
42+
static Libraries()
43+
{
44+
CoreFoundation = CoreFoundationBasePath;
45+
IOKitFramework = IOKitFrameworkBasePath;
46+
WinSCard = WinSCardBasePath;
47+
}
48+
#endif
4049
}
4150
}

0 commit comments

Comments
 (0)