ILSpy icon indicating copy to clipboard operation
ILSpy copied to clipboard

Can't open the .NET bundle file (R2R).

Open wwh1004 opened this issue 10 months ago • 3 comments

Same as https://github.com/icsharpcode/ILSpy/issues/3197 but decompile r2r

Image

Image

wwh1004 avatar Feb 13 '25 02:02 wwh1004

@cshung @eduardo-vp It looks like the ReadyToRunReader expects the file to be processed to exist on disk, which is not true for bundles. The entries of a bundle are handled in memory only and I think you may have to use PEReader.GetEntireImage() instead. Is this something you can change?

siegfriedpammer avatar Feb 13 '25 06:02 siegfriedpammer

Thanks for the bug report @wwh1004.

@siegfriedpammer, I think you are right that we will need to change the ReadyToRunReader such that it accepts the image content from the constructor instead of reading it from file system directly.

With a hack, I am able to get ReadyToRun to work with bundles.

There will be some changes on both sides (inside the package, I need to get it to accept the content from the constructor), and outside the package, the ILSpy.ReadyToRun plugin need to get the content available for it.

I will send a PR for it when I can.

  • https://github.com/dotnet/runtime/pull/112541
  • https://github.com/icsharpcode/ILSpy/pull/3398

cshung avatar Feb 13 '25 21:02 cshung

Thank you for your fast response!

siegfriedpammer avatar Feb 15 '25 19:02 siegfriedpammer