icsharpcode / ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
20.7k stars 3.29k forks source link

CLI should have options for all decompiler settings and/or option for loading ILSpy.xml #2800

Open lbmaian opened 1 year ago

lbmaian commented 1 year ago

Is your feature request related to a problem? Please describe. The CLI does not have options corresponding to all the decompiler settings available in the GUI

Instead, it only supports the following:

Describe the solution you'd like The CLI should either or both:

  1. Provide options for all decompiler settings in https://github.com/icsharpcode/ILSpy/blob/master/ICSharpCode.Decompiler/DecompilerSettings.cs
  2. Provide option to load such settings from an ILSpy.xml or the default one at %APPDATA%\ICSharpCode\ILSpy.xml

This should apply to both ilspycmd and the PowerShell equivalent

christophwille commented 1 year ago

Do you need any of those? We picked what we considered "most common", and intentionally did not go for everything.

lbmaian commented 1 year ago

I just want to have the same settings I have in the GUI, and there's two ways to accomplish that: either add options for all the decompiler settings, or an option to load the same settings that the GUI uses (ILSpy.xml)

christophwille commented 1 year ago

"Just because" is not a justification. I specifically asked which ones you think are missing.

lbmaian commented 1 year ago

For my use case, "Always qualify member references" and "Always show enum member values"

christophwille commented 1 year ago

Via #2869 ilspycmd could now use settings classes.

lbmaian commented 1 year ago

Thanks, but I don't see any command line changes?

I'm not sure what ILSpyX even is - can't find any documentation concerning it.

christophwille commented 1 year ago

I said could, not is. ILSpyX is a shared library of classes that used to be in ILSpy (now split out for reuse in other Frontends)

And, yes https://github.com/icsharpcode/ILSpy/blob/master/ICSharpCode.ILSpyX/PackageReadme.md is very thin. But we don't expect more than a handful of consumers.

lbmaian commented 1 year ago

Thanks for the clarification.