diff --git a/src/MoonWorksDllMap.cs b/src/MoonWorksDllMap.cs index 2e62864..c030adb 100644 --- a/src/MoonWorksDllMap.cs +++ b/src/MoonWorksDllMap.cs @@ -84,6 +84,12 @@ namespace MoonWorks [ModuleInitializer] public static void Init() { + // Ignore NativeAOT platforms since they don't perform dynamic loading. + if (!RuntimeFeature.IsDynamicCodeSupported) + { + return; + } + // Get the platform and architecture string os = GetPlatformName(); string cpu = RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();