AssemblyDef ResolveThrow(string asmFullName) { var asm = resolver.Resolve(asmFullName, module); if (asm is not null) { return(asm); } var newName = asmFullName switch { "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" => "WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" => "PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" => "PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35", _ => null, }; asm = newName is null ? null : resolver.Resolve(newName, module); return(asm ?? resolver.ResolveThrow(asmFullName, module) /*Will throw*/); }