diff --git a/src/coreclr/nativeaot/Common/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs similarity index 100% rename from src/coreclr/nativeaot/Common/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs rename to src/coreclr/nativeaot/System.Private.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj index 39337d896cbd20..979e19a5bdae5a 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj @@ -89,6 +89,7 @@ + @@ -370,9 +371,6 @@ Internal\Runtime\CanonTypeKind.cs - - Internal\Runtime\IDynamicInterfaceCastableSupport.cs - Internal\Runtime\MethodTable.cs diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs b/src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs new file mode 100644 index 00000000000000..c4b3a714299bd7 --- /dev/null +++ b/src/coreclr/nativeaot/Test.CoreLib/src/Internal/Runtime/IDynamicInterfaceCastableSupport.cs @@ -0,0 +1,24 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +using System; +using System.Runtime; + +namespace Internal.Runtime +{ + static unsafe class IDynamicCastableSupport + { + [RuntimeExport("IDynamicCastableIsInterfaceImplemented")] + internal static bool IDynamicCastableIsInterfaceImplemented(object instance, MethodTable* interfaceType, bool throwIfNotImplemented) + { + return false; + } + + [RuntimeExport("IDynamicCastableGetInterfaceImplementation")] + internal static IntPtr IDynamicCastableGetInterfaceImplementation(object instance, MethodTable* interfaceType, ushort slot) + { + RuntimeImports.RhpFallbackFailFast(); + return default; + } + } +} \ No newline at end of file diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs index 40721f9c53ac80..777b5790d145b6 100644 --- a/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs +++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/RuntimeExceptionHelpers.cs @@ -119,5 +119,10 @@ private static void AppendExceptionStackFrame(object exceptionObj, IntPtr IP, in internal static void OnFirstChanceException(object e) { } + + [RuntimeExport("OnUnhandledException")] + internal static void OnUnhandledException(object e) + { + } } } diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj b/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj index 8a307528473e30..c95cc9c17b8a39 100644 --- a/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj +++ b/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj @@ -210,6 +210,7 @@ Internal\Runtime\CompilerServices\Unsafe.cs +