Skip to content
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

ILSpyCmd: Add support for decompressing single-file bundles #2499

Merged

Conversation

Freakness109
Copy link
Contributor

Add a new flag -d|--dump-package to ILSpyCmd that decompresses
single-file bundles into a target directory.

Fixes #2498

Problem

#2498: Could not handle single-file bundles

Solution

  • Files in a single-file bundle are extracted into a directory, where subsequent runs of ILSpyCmd can actually decompile the assemblies.
  • Tried to stay consistent with the code in ILSpy/LoadedPackage.cs, specifically the functions FromBundle and BundleEntry.TryOpenStream.
  • This patch does not handle the case of subdirectories in single file bundles (I'm not sure whether they are allowed).
  • I'm not sure how to test the change

Add a new flag `-d|--dump-package` to ILSpyCmd that decompresses
single-file bundles into a target directory.
@siegfriedpammer siegfriedpammer self-assigned this Oct 3, 2021
@siegfriedpammer siegfriedpammer merged commit a335591 into icsharpcode:master Oct 14, 2021
@siegfriedpammer
Copy link
Member

Thank you very much for providing this feature! Sorry for taking so long to review this!

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

Successfully merging this pull request may close these issues.

ILSpyCmd does not recognize single-file executables
2 participants