Support disassembling single file bundle for ILSpy
Problem
https://github.com/icsharpcode/ILSpy/issues/3397
Solution
- To support disassembling PE images stored only in memory,
- The
ReadyToRunReaderis updated in this PR to support disassembling input given as aImmutableArray<byte>. - This change provide the image content to the
ReadyToRunReaderso that it can perform the disassembling duty. - [x] The change is tested by disassembling a simple single file bundle, with locally built
ReadyToRunReader.
~This change will NOT compile until we have the package updated, this CI is expected to fail for now.~
@cshung will that also close #3337 or is the work you mentioned still open?
@cshung will that also close #3337 or is the work you mentioned still open?
This PR is unrelated to #3337. I think #3337 should be closed with #3340 as the package is already updated there.
What are the chances we can get this in during March?
What are the chances we can get this in during March?
I have merged the change on the runtime repo side, however, it looks like the new package is going to depend on System.Reflection.Metadata with version 10.0.0-preview.3.25152.4 or above.
Although even today we "up" the dependency for SRM in ILSpy vs ICS.Decompiler, taking on a preview dependency for a RTM version of ours (your PR was dog-eared for 9.1) might be a hard pill to swallow.
@cshung I suppose this https://www.nuget.org/packages/System.Reflection.Metadata/10.0.0-preview.3.25171.5 would be the new package? (to replace 9.0.1 here https://github.com/icsharpcode/ILSpy/blob/5428a9b53a57d9c0ebd25c4a2e872dd00aef20fb/Directory.Packages.props#L45)
@cshung I suppose this https://www.nuget.org/packages/System.Reflection.Metadata/10.0.0-preview.3.25171.5 would be the new package? (to replace 9.0.1 here)
Yes! Assuming we are going to upgrade SRM to 10, I have rebased my PR and upgraded the package. This PR is now functional to disassemble ready to run code in a single file bundle.
ICSharpCode.Decompiler.csproj should not be touched - the "old" packages there are very much intentional (yes, a bog standard NuGet update will unknowingly wreak havoc)
@christophwille, hello?
@siegfriedpammer is working on moving ILSpy to. NET 10, that is why we postponed merging this PR. Sorry for not telling you.
@cshung thanks and sorry it took so long!