Skip to content

Only move properties with setters to XAML attributes#3701

Merged
siegfriedpammer merged 1 commit intoicsharpcode:masterfrom
ElektroKill:fix/issue3689
Mar 31, 2026
Merged

Only move properties with setters to XAML attributes#3701
siegfriedpammer merged 1 commit intoicsharpcode:masterfrom
ElektroKill:fix/issue3689

Conversation

@ElektroKill
Copy link
Copy Markdown
Contributor

Link to issue(s) this covers:
#3689

Problem

The AttributeRewritePass would create assignments via attributes despite the property not having a setter.

Solution

The problem was remedied by checking if the property has a setter.

I also cleaned up the code a little.

I did not add a test as the input code provided in the issue will not compile under .NET 1,0 which is the TFM of the BamlDecompiler test project. The provided input code does compile on .NET 8.

@siegfriedpammer
Copy link
Copy Markdown
Member

Thank you for your contribution!

@siegfriedpammer siegfriedpammer merged commit 848e21a into icsharpcode:master Mar 31, 2026
5 checks passed
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.

2 participants