MSDN-WhiteKnight / CilTools

A set of tools to work with CIL in .NET applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GetTypeFromHandleUnsafe method not found on .NET Core 3.1+ Linux

MSDN-WhiteKnight opened this issue · comments

Test_CilGraph_DynamicMethod crashes on .NET Core 3.1+ Linux

Error:

System.MissingMethodException: GetTypeFromHandleUnsafe is not found
at CilTools.Reflection.ModuleWrapperDynamic.ResolveMember(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) in /home/runner/work/CilTools/CilTools/CilTools.BytecodeAnalysis/Reflection/ModuleWrapperDynamic.cs:line 278
at CilTools.BytecodeAnalysis.CilInstruction.ResolveMemberToken(Int32 token) in /home/runner/work/CilTools/CilTools/CilTools.BytecodeAnalysis/CilInstruction.cs:line 248
at CilTools.BytecodeAnalysis.CilTokenInstruction.get_ReferencedMember() in /home/runner/work/CilTools/CilTools/CilTools.BytecodeAnalysis/CilTokenInstruction.cs:line 39

In .NET 7 could be worked around using RuntimeTypeHandle.FromIntPtr