diff --git a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs index 8bb7c1f6eedd6c..c5fa24eb2b096b 100644 --- a/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs +++ b/src/coreclr/tools/aot/ILCompiler.Compiler/IL/ILImporter.Scanner.cs @@ -746,6 +746,13 @@ private void ImportCall(ILOpcode opcode, int token) else { _dependencies.Add(_factory.RuntimeMethodHandle(methodToLookup), reason); + + MethodDesc concreteMethod = targetMethod; + targetMethod = targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); + if (targetMethod.RequiresInstMethodDescArg()) + { + _dependencies.Add(_factory.MethodGenericDictionary(concreteMethod), reason); + } } _dependencies.Add(GetHelperEntrypoint(ReadyToRunHelper.GVMLookupForSlot), reason);