Skip to content

XamlC ignores isError option in ObsoleteAttribute #23961

@AlexanderEgorov

Description

@AlexanderEgorov

Description

It seems the issue described in #18704 is not fixed.

  • Setting any property (Bindable or regular) with the ObsoleteAttribute in XAML should lead to a warning during compilation (this currently works). Additionally, the warning should include the text specified in the ObsoleteAttribute (does not work).
  • If the ObsoleteAttribute has the error parameter set to true, it should result in a compilation error (does not work).
  • The above rules should apply when attempting to set a property in styles (does not work).
  • The above rules should also apply to entire classes (does not work).

Steps to Reproduce

  1. Download the attached repo
  2. Checkout MainPage.xaml and MaingPage.xaml.cs
  3. Build the project
  4. Check the build output

Link to public reproduction project repository

https://github.com/AlexanderEgorov/dotnet-maui-bug-obsolete

Version with bug

8.0.61 SR6.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-xamlXAML, CSS, Triggers, Behaviorsplatform/androidplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions