mirror of
https://github.com/icsharpcode/ILSpy.git
synced 2026-10-12 02:15:58 +00:00
KnownThings hard-required PresentationFramework, PresentationCore and WindowsBase to be resolvable, so decompiling a WPF binary on a machine without WPF (Linux/macOS) threw "Could not resolve known assembly" and aborted the whole BAML decompile. Mirror MinimalCorlib: when a well-known BAML assembly cannot be resolved, BamlDecompilerTypeSystem substitutes a synthetic stand-in module that upholds the invariant KnownThings assumes. The stand-in only materializes the types the decompiler explicitly seeds, so it stays bounded to the well-known set and references to other types keep degrading to UnknownType exactly as before. For the WPF assemblies it also reproduces the XmlnsDefinitionAttribute mapping so known types still serialize under the presentation xmlns instead of a clr-namespace fallback. Assisted-by: Claude:claude-opus-4-8:Claude Code