Skip to content

CLI does not identify Avalonia (.axaml) files #570

Description

@lmejiauxd

Describe the bug
When running XamlStyler through the console, there is no way to force it to handle .axaml files as Avalonia ones. As a result, it incorrectly escapes the child combinator (>) in style selectors as >

To Reproduce

  1. Create an .axaml file containing a style selector with a child combinator (>).
  2. Format the file with XamlStyler through the console.
  3. The > character is replaced with >.

Expected behavior
XamlStyler should recognize .axaml files as Avalonia ones when run in the console, preventing incorrect character escaping in style selectors.

Version Info:

  • OS: Windows 11 25H2
  • Visual Studio: VS2026 (18.8.2)
  • XAML Styler: Console (3.2501.8)

Additional context
XamlStyler correctly recognizes Avalonia files when run inside Visual Studio by using the EnvDTE.Document API, but that's not available in the console tool.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions