Is there a way to do automated decompilation with ILSpy?
Asked Answered
A

1

5

We have a rather large third party product which contains a lot of C# DLLs and is updated every month or so. While the decompiler does only a 98% job where it can't get everything, it's good enough for my purposes for the occasional comparative analysis.

Would there be a way to do command line decompilation so that I could decompile every month's release and save it in an archive in an automated manner?

Perhaps something like

ilspy /f phantasmagorical.dll /s c:\myapp\archive\mar2020

/f - file to decompile, .dll, .exe, etc.
/s - save location
Aetna answered 25/3, 2020 at 20:13 Comment(0)
C
8

ILSpy.exe is meant for interactive use and doesn't have anything like that.

You can instead use the ilspycmd command line tool:

ilspycmd phantasmagorical.dll -p -o c:\myapp\archive\mar2020

You could also use the ICSharpCode.Decompiler nuget package to programatically run the decompiler.

Cogon answered 26/3, 2020 at 13:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.