ILSpy icon indicating copy to clipboard operation
ILSpy copied to clipboard

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

Open lbmaian opened this issue 2 years ago • 8 comments

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:

  • language version defaults (--languageversion)
  • RemoveDeadCode (--no-dead-code)
  • RemoveDeadStores (--no-dead-stores)
  • UseNestedDirectoriesForNamespaces (--nested-directories) in 8.0+

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

lbmaian avatar Oct 07 '22 02:10 lbmaian

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

christophwille avatar Oct 07 '22 05:10 christophwille

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)

lbmaian avatar Oct 07 '22 05:10 lbmaian

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

christophwille avatar Oct 07 '22 06:10 christophwille

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

lbmaian avatar Oct 07 '22 06:10 lbmaian

Via #2869 ilspycmd could now use settings classes.

christophwille avatar Apr 07 '23 12:04 christophwille

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.

lbmaian avatar Apr 08 '23 01:04 lbmaian

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.

christophwille avatar Apr 08 '23 04:04 christophwille

Thanks for the clarification.

lbmaian avatar Apr 08 '23 08:04 lbmaian