3 Commits
Author SHA1 Message Date
Siegfried Pammer 74bc61b70f ilspycmd: add --member for single-member decompilation
Decompiling one method or property previously required decompiling its
whole type and searching the output, which is wasteful for scripted and
agent-driven use against large assemblies. The new -m|--member option
accepts an XML documentation id string (the syntax of compiler-generated
documentation files and of the UI's --navigateto option) or a metadata
token in 0x06000005 form, resolves it against the main module (with a
bounds check for tokens and distinct error messages for malformed ids,
unknown members, and members of other modules), and prints just that
member through the engine's single-member decompilation path.

The tests seed a new ICSharpCode.ILSpyCmd.Tests project (part of the
XPlat and Desktop solution filters and of the per-project CI test
steps), driving the real Main in-process via InternalsVisibleTo, so
future ilspycmd features have a dedicated home for CLI tests.

Assisted-by: Claude:claude-fable-5:Claude Code
2026-07-28 14:25:04 +02:00
Siegfried Pammer 5343d849d4 Revive BAML decompiler tests as two projects and run them in CI
The BAML tests were orphaned: in no solution, no CI, and missing their
ICSharpCode.BamlDecompiler reference. Revive them split by platform,
mirroring ILSpy.Tests / ILSpy.Tests.Windows: ILSpy.BamlDecompiler.Tests
(net11.0) holds platform-agnostic tests - including a regression test that
decompiles with the WPF assemblies hidden, covering the missing-assembly
fix - and ILSpy.BamlDecompiler.Tests.Windows (net11.0-windows) holds the
WPF round-trip cases that compile XAML into BAML. Single-TFM projects keep
normal lock files; the Windows one declares all RIDs so its lock is
generatable and verifiable on any host.

Wire the cross-platform project into ILSpy.sln, ILSpy.XPlat.slnf and
ILSpy.Desktop.slnf so it builds and runs on the Linux/macOS legs; the
Windows project stays in ILSpy.sln (its tests execute in the Windows leg).
The Windows job also archives that assembly, whose embedded BAML lets the
decompiler be exercised against real BAML on a host without WPF.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-07-12 19:30:01 +02:00
Siegfried Pammer b88329963e Rename ILSpy.Wpf.slnf -> ILSpy.Desktop.slnf with updated contents
The slnf name was a leftover from when ILSpy.csproj was WPF; its
contents are now the Avalonia desktop projects. Drop the dead
ILSpy.BamlDecompiler.csproj ref (the directory no longer holds a
project after the engine moved to ICSharpCode.BamlDecompiler) and the
out-of-scope items (TestPlugin, ILSpy.BamlDecompiler.Tests) -- they're
in neither ILSpy.sln nor any active build flow, so the slnf filter
surfacing them in IDE listings was just noise.

Assisted-by: Claude:claude-opus-4-7:Claude Code
2026-06-08 18:34:54 +02:00