use the custom resolver

This commit is contained in:
vis2k 2021-08-23 17:05:21 +08:00
parent 633dcde64d
commit 6a2bf0a2be

View File

@ -57,7 +57,7 @@ public override ILPostProcessResult Process(ICompiledAssembly compiledAssembly)
byte[] peData = compiledAssembly.InMemoryAssembly.PeData;
//LogDiagnostics($" peData.Length={peData.Length} bytes");
using (MemoryStream stream = new MemoryStream(peData))
using (DefaultAssemblyResolver asmResolver = new DefaultAssemblyResolver())
using (ILPostProcessorAssemblyResolver asmResolver = new ILPostProcessorAssemblyResolver(compiledAssembly, Log))
{
// we need to load symbols. otherwise we get:
// "(0,0): error Mono.CecilX.Cil.SymbolsNotFoundException: No symbol found for file: "