knah/Il2CppAssemblyUnhollower

Failed to resolve assembly "System.Private.CoreLib ..."

almenjonatan opened this issue · 2 comments

I am not sure I am using it as intended.

I dumped the game and tried to "recompile" it, I am using the right mscorlib?

bild

knah commented

First, make sure you're using non-netcore Il2CppDumper.
Second, the mscorlib needs to be the mscorlib from the runtime that the generated assemblies should run on. Typically it would be bundled with whatever loader/injector you're using for managed domain.

This could also be resolved just by adding

if (oldAssembly.Name.Name == "System.Private.CoreLib")
{
    return myAssembliesByOld.Single(x => x.Key.Name.Name == "mscorlib").Value;
}

at https://github.com/knah/Il2CppAssemblyUnhollower/blob/master/AssemblyUnhollower/Contexts/RewriteGlobalContext.cs#L62