Skip to content

Support disassembling single file bundle for ILSpy #3398

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cshung
Copy link
Contributor

@cshung cshung commented Feb 13, 2025

Problem

#3397

Solution

  • To support disassembling PE images stored only in memory,
  • The ReadyToRunReader is updated in this PR to support disassembling input given as a ImmutableArray<byte>.
  • This change provide the image content to the ReadyToRunReader so that it can perform the disassembling duty.
  • 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.

@christophwille
Copy link
Member

@cshung will that also close #3337 or is the work you mentioned still open?

@cshung
Copy link
Contributor Author

cshung commented Feb 25, 2025

@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.

@christophwille
Copy link
Member

What are the chances we can get this in during March?

@cshung
Copy link
Contributor Author

cshung commented Mar 12, 2025

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.

@christophwille
Copy link
Member

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.

@christophwille
Copy link
Member

christophwille commented Apr 11, 2025

@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

<PackageVersion Include="System.Reflection.Metadata" Version="9.0.1" />
)

@cshung cshung force-pushed the public/disassemble-single-file-bundle branch from 75abee7 to b0f4fc5 Compare April 13, 2025 17:23
@cshung
Copy link
Contributor Author

cshung commented Apr 13, 2025

@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.

@christophwille
Copy link
Member

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)

@cshung cshung force-pushed the public/disassemble-single-file-bundle branch from 1c94194 to 2edccad Compare April 15, 2025 15:47
@cshung
Copy link
Contributor Author

cshung commented May 6, 2025

@christophwille, hello?

@christophwille
Copy link
Member

@siegfriedpammer is working on moving ILSpy to. NET 10, that is why we postponed merging this PR. Sorry for not telling you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants