Registry Mirror
Skip to content

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Summary

  • Use the BAML-recorded owner type to decide unresolved XAML property ownership.
  • Keep unresolved properties of the element's own type in plain attribute syntax.
  • Preserve attached-property syntax when the unresolved owner is a different type.

Fix #3316

Tests

  • Running tests from /home/siegfried/Projects/ILSpy/ILSpy.BamlDecompiler.Tests/bin/Debug/net11.0/ILSpy.BamlDecompiler.Tests.dll (net11.0|x64)
    Warning: Trx file '/home/siegfried/Projects/ILSpy/TestResults/ILSpy.BamlDecompiler.Tests_net11.0_x64.trx' already exists and will be overwritten.
    /home/siegfried/Projects/ILSpy/ILSpy.BamlDecompiler.Tests/bin/Debug/net11.0/ILSpy.BamlDecompiler.Tests.dll (net11.0|x64) passed [+39/x0/?0] (4s 550ms)

    In process file artifacts produced:

    • /home/siegfried/Projects/ILSpy/TestResults/ILSpy.BamlDecompiler.Tests_net11.0_x64.trx

Test run summary: Passed!
total: 39
failed: 0
succeeded: 39
skipped: 0
duration: 4s 936ms (39 passed)

Assisted-by: OpenCode:gpt-5.5:opencode

Attached-property syntax was the fallback for every property the decompiler could
not resolve, and nothing of a third-party WPF assembly resolves on a machine that
does not have it. The XAML parser rejects "Type.Property" for a property with no
attached accessors, so whole documents came back uncompilable. The BAML records
name the owner of each attribute, and that is enough to tell a property of the
element's own type from an attached one without resolving anything.

Assisted-by: Claude:claude-opus-5:Claude Code
@siegfriedpammer
siegfriedpammer merged commit c2df117 into master Sep 21, 2026
17 checks passed
@siegfriedpammer
siegfriedpammer deleted the fix/3316-unresolved-property-attached-syntax branch September 21, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attribute is not allowed in property element

1 participant